# HG changeset patch # User Me # Date 1289141601 28800 # Node ID b6ce47a0909bc371af429a0c13db8c338703240f # Parent b456b67cddd03b8344e74dabdea3d46b304ceba4 minor -- changed VMS__dissipate_procr to VMS__send_dissipate_req diff -r b456b67cddd0 -r b6ce47a0909b VCilk_PluginFns.c --- a/VCilk_PluginFns.c Sat Oct 30 20:51:40 2010 -0700 +++ b/VCilk_PluginFns.c Sun Nov 07 06:53:21 2010 -0800 @@ -40,6 +40,30 @@ //=========================================================================== +//============================== Scheduler ================================== +// +/*For VCilk, scheduling a slave simply takes the next work-unit off the + * ready-to-go work-unit queue and assigns it to the slaveToSched. + *If the ready-to-go work-unit queue is empty, then nothing to schedule + * to the slave -- return FALSE to let Master loop know scheduling that + * slave failed. + */ +VirtProcr * +VCilk__schedule_virt_procr( void *_semEnv, int coreNum ) + { VirtProcr *schedPr; + VCilkSemEnv *semEnv; + + semEnv = (VCilkSemEnv *)_semEnv; + + schedPr = readPrivQ( semEnv->readyVPQs[coreNum] ); + //Note, using a non-blocking queue -- it returns NULL if queue empty + + return( schedPr ); + } + + +//=========================== Request Handler ============================= +// /*Will get requests to send, to receive, and to create new processors. * Upon send, check the hash to see if a receive is waiting. * Upon receive, check hash to see if a send has already happened. @@ -108,28 +132,6 @@ } -//============================== Scheduler ================================== - - -/*For VCilk, scheduling a slave simply takes the next work-unit off the - * ready-to-go work-unit queue and assigns it to the slaveToSched. - *If the ready-to-go work-unit queue is empty, then nothing to schedule - * to the slave -- return FALSE to let Master loop know scheduling that - * slave failed. - */ -VirtProcr * -VCilk__schedule_virt_procr( void *_semEnv, int coreNum ) - { VirtProcr *schedPr; - VCilkSemEnv *semEnv; - - semEnv = (VCilkSemEnv *)_semEnv; - - schedPr = readPrivQ( semEnv->readyVPQs[coreNum] ); - //Note, using a non-blocking queue -- it returns NULL if queue empty - - return( schedPr ); - } - //=========================== Request Handlers ============================== void inline @@ -274,7 +276,7 @@ //Now do normal dissipate //call VMS to free_all AppVP state -- stack and so on - VMS__handle_dissipate_reqst( requestingPr ); + VMS__dissipate_procr( requestingPr ); semEnv->numVirtPr -= 1; if( semEnv->numVirtPr == 0 ) diff -r b456b67cddd0 -r b6ce47a0909b VCilk_lib.c --- a/VCilk_lib.c Sat Oct 30 20:51:40 2010 -0700 +++ b/VCilk_lib.c Sun Nov 07 06:53:21 2010 -0800 @@ -295,7 +295,7 @@ VCilk__dissipate_procr( VirtProcr *procrToDissipate ) { - VMS__dissipate_procr( procrToDissipate ); + VMS__send_dissipate_req( procrToDissipate ); } //===========================================================================