Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
changeset 236:d9053472d0db Common_Ancestor
minor bug fixes, and name chg
| author | Some Random Person <seanhalle@yahoo.com> |
|---|---|
| date | Sat, 17 Mar 2012 00:41:34 -0700 |
| parents | ecbf6992dab4 |
| children | ce1f57e10fac |
| files | AnimationMaster.c CoreController.c Defines/VMS_defs__HW_constants.h VMS__startup_and_shutdown.c |
| diffstat | 4 files changed, 9 insertions(+), 10 deletions(-) [+] |
line diff
1.1 --- a/AnimationMaster.c Fri Mar 16 23:40:55 2012 -0700 1.2 +++ b/AnimationMaster.c Sat Mar 17 00:41:34 2012 -0700 1.3 @@ -149,7 +149,7 @@ 1.4 1.5 //Scan the animation slots 1.6 numSlotsFilled = 0; 1.7 - for( slotIdx = 0; slotIdx < NUM_SCHED_SLOTS; slotIdx++) 1.8 + for( slotIdx = 0; slotIdx < NUM_ANIM_SLOTS; slotIdx++) 1.9 { 1.10 currSlot = animSlots[ slotIdx ]; 1.11
2.1 --- a/CoreController.c Fri Mar 16 23:40:55 2012 -0700 2.2 +++ b/CoreController.c Sat Mar 17 00:41:34 2012 -0700 2.3 @@ -134,7 +134,7 @@ 2.4 //Alternatively, the VP suspend primitive could just not bother 2.5 // returning from switchToSlv, and instead jmp directly to here. 2.6 2.7 - if( currSlotIdx >= NUM_SCHED_SLOTS ) goto switchToMaster; 2.8 + if( currSlotIdx >= NUM_ANIM_SLOTS ) goto switchToMaster; 2.9 currSlot = animSlots[ currSlotIdx ]; 2.10 2.11 if( ! currSlot->needsSlaveAssigned ) //slot does have slave assigned 2.12 @@ -275,20 +275,19 @@ 2.13 int32 thisCoresIdx; 2.14 int32 numRepetitionsWithNoWork; 2.15 SlaveVP *currVP; 2.16 - AnimSlot *currSlot, **animSlots; 2.17 + AnimSlot *currSlot, **animSlots; 2.18 int32 currSlotIdx; 2.19 int32 *addrOfMasterLock; 2.20 SlaveVP *thisCoresMasterVP; 2.21 2.22 //=============== Initializations =================== 2.23 + thisCoresIdx = 0; //sequential version 2.24 animSlots = _VMSMasterEnv->allAnimSlots[thisCoresIdx]; 2.25 currSlotIdx = 0; //start at slot 0, go up until one empty, then do master 2.26 numRepetitionsWithNoWork = 0; 2.27 addrOfMasterLock = &(_VMSMasterEnv->masterLock); 2.28 thisCoresMasterVP = _VMSMasterEnv->masterVPs[thisCoresIdx]; 2.29 2.30 - thisCoresIdx = 0; //sequential version 2.31 - 2.32 //Assembly that saves addr of label of return instr -- label in assmbly 2.33 recordCoreCtlrReturnLabelAddr((void**)&(_VMSMasterEnv->coreCtlrReturnPt)); 2.34 2.35 @@ -296,7 +295,7 @@ 2.36 //====================== The Core Controller ====================== 2.37 while(1) 2.38 { 2.39 - if( currSlotIdx >= NUM_SCHED_SLOTS ) goto switchToMaster; 2.40 + if( currSlotIdx >= NUM_ANIM_SLOTS ) goto switchToMaster; 2.41 currSlot = animSlots[ currSlotIdx ]; 2.42 2.43 if( ! currSlot->needsSlaveAssigned ) //slot does have slave assigned
3.1 --- a/Defines/VMS_defs__HW_constants.h Fri Mar 16 23:40:55 2012 -0700 3.2 +++ b/Defines/VMS_defs__HW_constants.h Sat Mar 17 00:41:34 2012 -0700 3.3 @@ -18,7 +18,7 @@ 3.4 3.5 // tradeoff amortizing master fixed overhead vs imbalance potential 3.6 // when work-stealing, can make bigger, at risk of losing cache affinity 3.7 -#define NUM_SCHED_SLOTS 1 3.8 +#define NUM_ANIM_SLOTS 1 3.9 3.10 //These are for backoff inside core-loop, which reduces lock contention 3.11 #define NUM_REPS_W_NO_WORK_BEFORE_YIELD 10
4.1 --- a/VMS__startup_and_shutdown.c Fri Mar 16 23:40:55 2012 -0700 4.2 +++ b/VMS__startup_and_shutdown.c Sat Mar 17 00:41:34 2012 -0700 4.3 @@ -335,9 +335,9 @@ 4.4 { AnimSlot **animSlots; 4.5 int i; 4.6 4.7 - animSlots = VMS_int__malloc( NUM_SCHED_SLOTS * sizeof(AnimSlot *) ); 4.8 + animSlots = VMS_int__malloc( NUM_ANIM_SLOTS * sizeof(AnimSlot *) ); 4.9 4.10 - for( i = 0; i < NUM_SCHED_SLOTS; i++ ) 4.11 + for( i = 0; i < NUM_ANIM_SLOTS; i++ ) 4.12 { 4.13 animSlots[i] = VMS_int__malloc( sizeof(AnimSlot) ); 4.14 4.15 @@ -353,7 +353,7 @@ 4.16 void 4.17 freeAnimSlots( AnimSlot **animSlots ) 4.18 { int i; 4.19 - for( i = 0; i < NUM_SCHED_SLOTS; i++ ) 4.20 + for( i = 0; i < NUM_ANIM_SLOTS; i++ ) 4.21 { 4.22 VMS_int__free( animSlots[i] ); 4.23 }
