Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
comparison VMS.c @ 194:0072a555f59c
remove subrepos
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Thu, 09 Feb 2012 16:48:42 +0100 |
| parents | 69eb54ce9c4b |
| children | d83f59e6e2db |
comparison
equal
deleted
inserted
replaced
| 89:5bb73365cc52 | 90:1794d918ca55 |
|---|---|
| 147 readyToAnimateQs[ coreIdx ] = makeVMSQ(); | 147 readyToAnimateQs[ coreIdx ] = makeVMSQ(); |
| 148 | 148 |
| 149 //Q: should give masterVP core-specific info as its init data? | 149 //Q: should give masterVP core-specific info as its init data? |
| 150 masterVPs[ coreIdx ] = VMS__create_procr( (VirtProcrFnPtr)&masterLoop, (void*)masterEnv ); | 150 masterVPs[ coreIdx ] = VMS__create_procr( (VirtProcrFnPtr)&masterLoop, (void*)masterEnv ); |
| 151 masterVPs[ coreIdx ]->coreAnimatedBy = coreIdx; | 151 masterVPs[ coreIdx ]->coreAnimatedBy = coreIdx; |
| 152 masterVPs[ coreIdx ]->isMasterVP = TRUE; | |
| 152 allSchedSlots[ coreIdx ] = create_sched_slots(); //makes for one core | 153 allSchedSlots[ coreIdx ] = create_sched_slots(); //makes for one core |
| 153 _VMSMasterEnv->numMasterInARow[ coreIdx ] = 0; | 154 _VMSMasterEnv->numMasterInARow[ coreIdx ] = 0; |
| 154 _VMSMasterEnv->workStealingGates[ coreIdx ] = NULL; | 155 _VMSMasterEnv->workStealingGates[ coreIdx ] = NULL; |
| 155 } | 156 } |
| 156 _VMSMasterEnv->readyToAnimateQs = readyToAnimateQs; | 157 _VMSMasterEnv->readyToAnimateQs = readyToAnimateQs; |
| 438 #endif | 439 #endif |
| 439 #ifdef MEAS__PERF_COUNTERS | 440 #ifdef MEAS__PERF_COUNTERS |
| 440 //start work | 441 //start work |
| 441 uint64 cycles,instrs; | 442 uint64 cycles,instrs; |
| 442 saveCyclesAndInstrs(animatingPr->coreAnimatedBy,cycles, instrs); | 443 saveCyclesAndInstrs(animatingPr->coreAnimatedBy,cycles, instrs); |
| 443 (*(_VMSMasterEnv->counterHandler))(Procr_suspend,animatingPr,cycles,instrs); | 444 (*(_VMSMasterEnv->counterHandler))(HwResponderInvocation_start,animatingPr->procrID,animatingPr->numTimesScheduled,animatingPr,cycles,instrs); |
| 444 #endif | 445 #endif |
| 445 //======================================================================= | 446 //======================================================================= |
| 446 | 447 |
| 447 switchToCoreLoop(animatingPr); | 448 switchToCoreLoop(animatingPr); |
| 448 flushRegisters(); | 449 flushRegisters(); |
| 728 //create the shutdown processors, one for each core loop -- put them | 729 //create the shutdown processors, one for each core loop -- put them |
| 729 // directly into the Q -- each core will die when gets one | 730 // directly into the Q -- each core will die when gets one |
| 730 for( coreIdx=0; coreIdx < NUM_CORES; coreIdx++ ) | 731 for( coreIdx=0; coreIdx < NUM_CORES; coreIdx++ ) |
| 731 { //Note, this is running in the master | 732 { //Note, this is running in the master |
| 732 shutDownPr = VMS__create_procr( &endOSThreadFn, NULL ); | 733 shutDownPr = VMS__create_procr( &endOSThreadFn, NULL ); |
| 734 shutDownPr->isShutdownVP = TRUE; | |
| 733 writeVMSQ( shutDownPr, _VMSMasterEnv->readyToAnimateQs[coreIdx] ); | 735 writeVMSQ( shutDownPr, _VMSMasterEnv->readyToAnimateQs[coreIdx] ); |
| 734 } | 736 } |
| 735 #ifdef MEAS__PERF_COUNTERS | 737 #ifdef MEAS__PERF_COUNTERS |
| 736 uint64 tmpc,tmpi; | 738 uint64 tmpc,tmpi; |
| 737 saveCyclesAndInstrs(0,tmpc,tmpi); | 739 saveCyclesAndInstrs(0,tmpc,tmpi); |
