Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
diff AnimationMaster.c @ 270:292393c6bef1
about to recover probes, so need to commit current state
| author | Sean Halle <seanhalle@yahoo.com> |
|---|---|
| date | Wed, 16 Jan 2013 01:50:26 -0800 |
| parents | e6a68e7ea63f |
| children | bc5030385120 |
line diff
1.1 --- a/AnimationMaster.c Mon Jan 14 16:10:37 2013 -0800 1.2 +++ b/AnimationMaster.c Wed Jan 16 01:50:26 2013 -0800 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright 2010 OpenSourceResearchInstitute 1.6 + * Copyright 2012 OpenSourceResearchInstitute.org 1.7 * 1.8 * Licensed under BSD 1.9 */ 1.10 @@ -26,9 +26,8 @@ 1.11 1.12 1.13 //inline void masterFunction_SingleLang( PRLangEnv *protoLangEnv, AnimSlot *slot ); 1.14 -inline void masterFunction( AnimSlot *slot ); 1.15 inline PRProcess * pickAProcess( AnimSlot *slot ); 1.16 -inline SlaveVP * assignWork( PRProcess *process, AnimSlot *slot ); 1.17 +inline bool32 assignWork( PRProcess *process, AnimSlot *slot ); 1.18 1.19 /*The animationMaster embodies most of the animator of the language. The 1.20 * animator is what emodies the behavior of language constructs. 1.21 @@ -94,7 +93,7 @@ 1.22 1.23 1.24 inline 1.25 -void 1.26 +bool32 1.27 masterFunction( AnimSlot *slot ) 1.28 { //Scan the animation slots 1.29 int32 magicNumber; 1.30 @@ -102,6 +101,7 @@ 1.31 PRLangEnv *langEnv; 1.32 PRReqst *req; 1.33 PRProcess *process; 1.34 + bool32 foundWork; 1.35 1.36 //Check if newly-done slave in slot, which will need request handled 1.37 if( slot->workIsDone ) 1.38 @@ -160,10 +160,13 @@ 1.39 1.40 //Scan lang environs, looking for langEnv with ready work. 1.41 // call the Assigner for that lang Env, to get a slave for the slot 1.42 + foundWork = 1.43 assignWork( process, slot ); 1.44 1.45 HOLISTIC__Record_Assigner_end; 1.46 }//if slot needs slave assigned 1.47 + 1.48 + return foundWork; 1.49 } 1.50 1.51 /*When several processes exist, use some pattern for picking one to give 1.52 @@ -218,7 +221,7 @@ 1.53 * but am making it possible. 1.54 */ 1.55 inline 1.56 -SlaveVP * 1.57 +bool32 1.58 assignWork( PRProcess *process, AnimSlot *slot ) 1.59 { SlaveVP *returnSlv; 1.60 int32 coreNum, slotNum; 1.61 @@ -242,7 +245,7 @@ 1.62 for( envIdx = 0; envIdx < numEnvs; envIdx++ ) //keep langEnvs in hash & array 1.63 { langEnv = langEnvsList[envIdx]; 1.64 if( langEnv->hasWork ) 1.65 - { (*langEnv->slaveAssigner)( langEnv, slot ); //assigner calls PR to put slave/task into slot 1.66 + { (*langEnv->workAssigner)( langEnv, slot ); //assigner calls PR to put slave/task into slot 1.67 goto ReturnAfterAssigningWork; //quit for-loop, cause found work 1.68 //NOTE: bad search alg -- should start where left off, then wrap around 1.69 }
