Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
diff MasterLoop.c @ 132:dbfc8382d546
distributed memory allocation interface - unfinished
| author | Merten Sach <msach@mailbox.tu-berlin.de> |
|---|---|
| date | Fri, 16 Sep 2011 14:25:49 +0200 |
| parents | 24466227d8bb |
| children | a9b72021f053 |
line diff
1.1 --- a/MasterLoop.c Wed Sep 07 17:45:05 2011 +0200 1.2 +++ b/MasterLoop.c Fri Sep 16 14:25:49 2011 +0200 1.3 @@ -94,6 +94,7 @@ 1.4 1.5 volatileMasterPr = animatingPr; 1.6 masterPr = (VirtProcr*)volatileMasterPr; //used to force re-define after jmp 1.7 + masterEnv = (MasterEnv*)_VMSMasterEnv; 1.8 1.9 //First animation of each MasterVP will in turn animate this part 1.10 // of setup code.. (VP creator sets up the stack as if this function 1.11 @@ -104,8 +105,7 @@ 1.12 // So, just make this an endless loop, and do assembly function at end 1.13 // that saves its own return addr, then jumps to core_loop. 1.14 while(1) 1.15 - { 1.16 - 1.17 + { 1.18 //============================= MEASUREMENT STUFF ======================== 1.19 #ifdef MEAS__TIME_MASTER 1.20 //Total Master time includes one coreloop time -- just assume the core 1.21 @@ -115,11 +115,9 @@ 1.22 #endif 1.23 //======================================================================== 1.24 1.25 - masterEnv = (MasterEnv*)_VMSMasterEnv; 1.26 - 1.27 - //GCC may optimize so doesn't always re-define from frame-storage 1.28 - masterPr = (VirtProcr*)volatileMasterPr; //on stack, reload after jmp 1.29 + //GCC may optimize so doesn't always re-define from frame-storage 1.30 thisCoresIdx = masterPr->coreAnimatedBy; 1.31 + masterEnv->currentMasterProcrID = thisCoresIdx; 1.32 readyToAnimateQ = masterEnv->readyToAnimateQs[thisCoresIdx]; 1.33 schedSlots = masterEnv->allSchedSlots[thisCoresIdx]; 1.34 1.35 @@ -174,6 +172,7 @@ 1.36 if( schedVirtPr != NULL ) 1.37 { currSlot->procrAssignedToSlot = schedVirtPr; 1.38 schedVirtPr->schedSlot = currSlot; 1.39 + schedVirtPr->coreAnimatedBy = thisCoresIdx; 1.40 currSlot->needsProcrAssigned = FALSE; 1.41 numSlotsFilled += 1; 1.42
