# HG changeset patch # User Merten Sach # Date 1330952342 -3600 # Node ID fb75c4b52d32a1c87a60ed382e2420fc11cfcb70 # Parent a262abf4b8d55326a76d6d9ed783700890c31a3d Fixed sequential version diff -r a262abf4b8d5 -r fb75c4b52d32 CoreLoop.c --- a/CoreLoop.c Fri Feb 17 18:43:52 2012 +0100 +++ b/CoreLoop.c Mon Mar 05 13:59:02 2012 +0100 @@ -243,6 +243,7 @@ { VirtProcr *currVP; VMSQueueStruc *readyToAnimateQ; + int32 numMasterInARow = 0; ThdParams *coreLoopThdParams; int thisCoresIdx; @@ -262,14 +263,14 @@ readyToAnimateQ = _VMSMasterEnv->readyToAnimateQs[thisCoresIdx]; currVP = (VirtProcr *) readVMSQ( readyToAnimateQ ); if( currVP == NULL ) - { if( _VMSMasterEnv->numMasterInARow[thisCoresIdx] > 1000 ) + { if( numMasterInARow > 1000 ) { printf("too many back to back MasterVP\n"); exit(1); } - _VMSMasterEnv->numMasterInARow[thisCoresIdx] += 1; + numMasterInARow += 1; currVP = _VMSMasterEnv->masterVPs[thisCoresIdx]; } else - _VMSMasterEnv->numMasterInARow[thisCoresIdx] = 0; + numMasterInARow = 0; switchToVP( currVP ); diff -r a262abf4b8d5 -r fb75c4b52d32 MasterLoop.c --- a/MasterLoop.c Fri Feb 17 18:43:52 2012 +0100 +++ b/MasterLoop.c Mon Mar 05 13:59:02 2012 +0100 @@ -340,7 +340,7 @@ //====== Start Gate-protection ======= vicGate->gateClosed = TRUE; - coreMightBeInProtected= vicGate->preGateProgress != vicGate->exitProgress; + coreMightBeInProtected= (vicGate->preGateProgress != vicGate->exitProgress); while( coreMightBeInProtected ) { //wait until sure if( vicGate->preGateProgress == vicGate->waitProgress )