Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VCilk_impls > VCilk__MC_shared_impl
changeset 1:b6ce47a0909b
minor -- changed VMS__dissipate_procr to VMS__send_dissipate_req
author | Me |
---|---|
date | Sun, 07 Nov 2010 06:53:21 -0800 |
parents | b456b67cddd0 |
children | 2845dca6a28b |
files | VCilk_PluginFns.c VCilk_lib.c |
diffstat | 2 files changed, 26 insertions(+), 24 deletions(-) [+] |
line diff
1.1 --- a/VCilk_PluginFns.c Sat Oct 30 20:51:40 2010 -0700 1.2 +++ b/VCilk_PluginFns.c Sun Nov 07 06:53:21 2010 -0800 1.3 @@ -40,6 +40,30 @@ 1.4 //=========================================================================== 1.5 1.6 1.7 +//============================== Scheduler ================================== 1.8 +// 1.9 +/*For VCilk, scheduling a slave simply takes the next work-unit off the 1.10 + * ready-to-go work-unit queue and assigns it to the slaveToSched. 1.11 + *If the ready-to-go work-unit queue is empty, then nothing to schedule 1.12 + * to the slave -- return FALSE to let Master loop know scheduling that 1.13 + * slave failed. 1.14 + */ 1.15 +VirtProcr * 1.16 +VCilk__schedule_virt_procr( void *_semEnv, int coreNum ) 1.17 + { VirtProcr *schedPr; 1.18 + VCilkSemEnv *semEnv; 1.19 + 1.20 + semEnv = (VCilkSemEnv *)_semEnv; 1.21 + 1.22 + schedPr = readPrivQ( semEnv->readyVPQs[coreNum] ); 1.23 + //Note, using a non-blocking queue -- it returns NULL if queue empty 1.24 + 1.25 + return( schedPr ); 1.26 + } 1.27 + 1.28 + 1.29 +//=========================== Request Handler ============================= 1.30 +// 1.31 /*Will get requests to send, to receive, and to create new processors. 1.32 * Upon send, check the hash to see if a receive is waiting. 1.33 * Upon receive, check hash to see if a send has already happened. 1.34 @@ -108,28 +132,6 @@ 1.35 } 1.36 1.37 1.38 -//============================== Scheduler ================================== 1.39 - 1.40 - 1.41 -/*For VCilk, scheduling a slave simply takes the next work-unit off the 1.42 - * ready-to-go work-unit queue and assigns it to the slaveToSched. 1.43 - *If the ready-to-go work-unit queue is empty, then nothing to schedule 1.44 - * to the slave -- return FALSE to let Master loop know scheduling that 1.45 - * slave failed. 1.46 - */ 1.47 -VirtProcr * 1.48 -VCilk__schedule_virt_procr( void *_semEnv, int coreNum ) 1.49 - { VirtProcr *schedPr; 1.50 - VCilkSemEnv *semEnv; 1.51 - 1.52 - semEnv = (VCilkSemEnv *)_semEnv; 1.53 - 1.54 - schedPr = readPrivQ( semEnv->readyVPQs[coreNum] ); 1.55 - //Note, using a non-blocking queue -- it returns NULL if queue empty 1.56 - 1.57 - return( schedPr ); 1.58 - } 1.59 - 1.60 1.61 //=========================== Request Handlers ============================== 1.62 void inline 1.63 @@ -274,7 +276,7 @@ 1.64 //Now do normal dissipate 1.65 1.66 //call VMS to free_all AppVP state -- stack and so on 1.67 - VMS__handle_dissipate_reqst( requestingPr ); 1.68 + VMS__dissipate_procr( requestingPr ); 1.69 1.70 semEnv->numVirtPr -= 1; 1.71 if( semEnv->numVirtPr == 0 )
2.1 --- a/VCilk_lib.c Sat Oct 30 20:51:40 2010 -0700 2.2 +++ b/VCilk_lib.c Sun Nov 07 06:53:21 2010 -0800 2.3 @@ -295,7 +295,7 @@ 2.4 VCilk__dissipate_procr( VirtProcr *procrToDissipate ) 2.5 { 2.6 2.7 - VMS__dissipate_procr( procrToDissipate ); 2.8 + VMS__send_dissipate_req( procrToDissipate ); 2.9 } 2.10 2.11 //===========================================================================