# HG changeset patch # User Some Random Person # Date 1331970094 25200 # Node ID d9053472d0dbbe2761d6c3d583c1e301751d3285 # Parent ecbf6992dab48ff439d9088b6e850f1bb896a394 minor bug fixes, and name chg diff -r ecbf6992dab4 -r d9053472d0db AnimationMaster.c --- a/AnimationMaster.c Fri Mar 16 23:40:55 2012 -0700 +++ b/AnimationMaster.c Sat Mar 17 00:41:34 2012 -0700 @@ -149,7 +149,7 @@ //Scan the animation slots numSlotsFilled = 0; - for( slotIdx = 0; slotIdx < NUM_SCHED_SLOTS; slotIdx++) + for( slotIdx = 0; slotIdx < NUM_ANIM_SLOTS; slotIdx++) { currSlot = animSlots[ slotIdx ]; diff -r ecbf6992dab4 -r d9053472d0db CoreController.c --- a/CoreController.c Fri Mar 16 23:40:55 2012 -0700 +++ b/CoreController.c Sat Mar 17 00:41:34 2012 -0700 @@ -134,7 +134,7 @@ //Alternatively, the VP suspend primitive could just not bother // returning from switchToSlv, and instead jmp directly to here. - if( currSlotIdx >= NUM_SCHED_SLOTS ) goto switchToMaster; + if( currSlotIdx >= NUM_ANIM_SLOTS ) goto switchToMaster; currSlot = animSlots[ currSlotIdx ]; if( ! currSlot->needsSlaveAssigned ) //slot does have slave assigned @@ -275,20 +275,19 @@ int32 thisCoresIdx; int32 numRepetitionsWithNoWork; SlaveVP *currVP; - AnimSlot *currSlot, **animSlots; + AnimSlot *currSlot, **animSlots; int32 currSlotIdx; int32 *addrOfMasterLock; SlaveVP *thisCoresMasterVP; //=============== Initializations =================== + thisCoresIdx = 0; //sequential version animSlots = _VMSMasterEnv->allAnimSlots[thisCoresIdx]; currSlotIdx = 0; //start at slot 0, go up until one empty, then do master numRepetitionsWithNoWork = 0; addrOfMasterLock = &(_VMSMasterEnv->masterLock); thisCoresMasterVP = _VMSMasterEnv->masterVPs[thisCoresIdx]; - thisCoresIdx = 0; //sequential version - //Assembly that saves addr of label of return instr -- label in assmbly recordCoreCtlrReturnLabelAddr((void**)&(_VMSMasterEnv->coreCtlrReturnPt)); @@ -296,7 +295,7 @@ //====================== The Core Controller ====================== while(1) { - if( currSlotIdx >= NUM_SCHED_SLOTS ) goto switchToMaster; + if( currSlotIdx >= NUM_ANIM_SLOTS ) goto switchToMaster; currSlot = animSlots[ currSlotIdx ]; if( ! currSlot->needsSlaveAssigned ) //slot does have slave assigned diff -r ecbf6992dab4 -r d9053472d0db Defines/VMS_defs__HW_constants.h --- a/Defines/VMS_defs__HW_constants.h Fri Mar 16 23:40:55 2012 -0700 +++ b/Defines/VMS_defs__HW_constants.h Sat Mar 17 00:41:34 2012 -0700 @@ -18,7 +18,7 @@ // tradeoff amortizing master fixed overhead vs imbalance potential // when work-stealing, can make bigger, at risk of losing cache affinity -#define NUM_SCHED_SLOTS 1 +#define NUM_ANIM_SLOTS 1 //These are for backoff inside core-loop, which reduces lock contention #define NUM_REPS_W_NO_WORK_BEFORE_YIELD 10 diff -r ecbf6992dab4 -r d9053472d0db VMS__startup_and_shutdown.c --- a/VMS__startup_and_shutdown.c Fri Mar 16 23:40:55 2012 -0700 +++ b/VMS__startup_and_shutdown.c Sat Mar 17 00:41:34 2012 -0700 @@ -335,9 +335,9 @@ { AnimSlot **animSlots; int i; - animSlots = VMS_int__malloc( NUM_SCHED_SLOTS * sizeof(AnimSlot *) ); + animSlots = VMS_int__malloc( NUM_ANIM_SLOTS * sizeof(AnimSlot *) ); - for( i = 0; i < NUM_SCHED_SLOTS; i++ ) + for( i = 0; i < NUM_ANIM_SLOTS; i++ ) { animSlots[i] = VMS_int__malloc( sizeof(AnimSlot) ); @@ -353,7 +353,7 @@ void freeAnimSlots( AnimSlot **animSlots ) { int i; - for( i = 0; i < NUM_SCHED_SLOTS; i++ ) + for( i = 0; i < NUM_ANIM_SLOTS; i++ ) { VMS_int__free( animSlots[i] ); }