From 9ba142106365d4bfb7fff266bcc98801651e502e Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sun, 5 Feb 2012 17:36:10 +1000 Subject: White space fixes. --- libraries/luaproc/luaproc.c | 11 +++++------ libraries/luaproc/luaproc.h | 5 ++--- 2 files changed, 7 insertions(+), 9 deletions(-) (limited to 'libraries') diff --git a/libraries/luaproc/luaproc.c b/libraries/luaproc/luaproc.c index 4770afd..8f1005e 100644 --- a/libraries/luaproc/luaproc.c +++ b/libraries/luaproc/luaproc.c @@ -70,7 +70,7 @@ struct stluaproc { }; /****************************** -* library functions prototypes +* library functions prototypes ******************************/ /* create a new lua process */ static int luaproc_create_newproc( lua_State *L ); @@ -157,7 +157,7 @@ luaproc luaproc_recycle_pop( void ) { /* destroy node (but not associated luaproc) */ list_destroy_node( n ); /* return associated luaproc */ - return lp; + return lp; } /* free access to operate on recycle list */ @@ -452,7 +452,7 @@ luaproc luaproc_dequeue_sender( channel chan ) { /* queue a luc process receiving a message without a matching sender */ void luaproc_queue_receiver( luaproc lp ) { /* add the receiving process to this process' receive queue */ - list_add( channel_get_recvq( lp->chan ), list_new_node( lp )); + list_add( channel_get_recvq( lp->chan ), list_new_node( lp )); } /* dequeue a lua process receiving a message with a sender match */ @@ -592,7 +592,7 @@ static int luaproc_send( lua_State *L ) { luaproc_movevalues( L, dstlp->lstate ); dstlp->args = lua_gettop( dstlp->lstate ) - 1; - + if ( sched_queue_proc( dstlp ) != LUAPROC_SCHED_QUEUE_PROC_OK ) { /* unlock channel access */ @@ -801,7 +801,7 @@ static int luaproc_destroy_channel( lua_State *L ) { pthread_mutex_t *chmutex; pthread_cond_t *chcond; const char *chname = luaL_checkstring( L, 1 ); - + /* get exclusive access to operate on channels */ pthread_mutex_lock( &mutex_channel ); @@ -923,4 +923,3 @@ void luaproc_unlock_channel( channel chan ) { int luaproc_get_destroyworker( luaproc lp ) { return lp->destroyworker; } - diff --git a/libraries/luaproc/luaproc.h b/libraries/luaproc/luaproc.h index d700e86..2f3ed3f 100644 --- a/libraries/luaproc/luaproc.h +++ b/libraries/luaproc/luaproc.h @@ -71,16 +71,15 @@ luaproc luaproc_create_sched( char *code ); void luaproc_register_funcs( lua_State *L ); /* allow registering of luaproc's functions in c main prog */ -void luaproc_register_lib( lua_State *L ); +void luaproc_register_lib( lua_State *L ); /* queue a luaproc that tried to send a message */ void luaproc_queue_sender( luaproc lp ); - const char *sendToChannel(const char *chname, const char *message); /* queue a luaproc that tried to receive a message */ -void luaproc_queue_receiver( luaproc lp ); +void luaproc_queue_receiver( luaproc lp ); /* unlock a channel's access */ void luaproc_unlock_channel( channel chan ); -- cgit v1.1