Skip to content

Commit

Permalink
Merge branch 'idle_fix' of https://github.com/doublec/WaspVM into dou…
Browse files Browse the repository at this point in the history
…blec-idle_fix
  • Loading branch information
swdunlop committed Jan 18, 2011
2 parents 49e3d24 + 72f23c5 commit 51c70da
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 8 additions & 2 deletions vm/os.c
Expand Up @@ -64,8 +64,14 @@ void wasp_disable_os_loop( ){
if( -- wasp_os_loop_use ) return;
wasp_disable_process( wasp_os_loop_process );
}

void wasp_os_poll( ){ event_loop( EVLOOP_NONBLOCK | EVLOOP_ONCE ); }

void wasp_os_poll( ){
if( wasp_enable_count == 1 ){
event_loop( EVLOOP_ONCE );
}else{
event_loop( EVLOOP_NONBLOCK | EVLOOP_ONCE );
}
}

void wasp_enable_conn_loop( wasp_os_connection oscon ){
if( oscon->looping ) return;
Expand Down
2 changes: 2 additions & 0 deletions vm/waspvm/process.h
Expand Up @@ -76,6 +76,8 @@ extern wasp_process wasp_first_enabled;
extern wasp_process wasp_last_enabled;
extern wasp_process wasp_active_process;

extern wasp_quad wasp_enable_count;

#define REQ_PROCESS_ARG( x ) REQ_TYPED_ARG( x, process )
#define OPT_PROCESS_ARG( x ) OPT_TYPED_ARG( x, process )
#define PROCESS_RESULT( x ) TYPED_RESULT( process, x )
Expand Down

0 comments on commit 51c70da

Please sign in to comment.