Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
diff VMS.c @ 137:99343ffe1918
The shutdown now uses inter master requests
| author | Merten Sach <msach@mailbox.tu-berlin.de> |
|---|---|
| date | Mon, 19 Sep 2011 14:15:37 +0200 |
| parents | f1374d5dbb98 |
| children | 99798e4438a6 8cc3d3812c8a |
line diff
1.1 --- a/VMS.c Fri Sep 16 20:13:33 2011 +0200 1.2 +++ b/VMS.c Mon Sep 19 14:15:37 2011 +0200 1.3 @@ -619,13 +619,9 @@ 1.4 // itself 1.5 //Note, should not stack-allocate initial data -- no guarantee, in 1.6 // general that creating processor will outlive ones it creates. 1.7 - 1.8 - 1.9 - /* 1.10 - * call the core specific version, because the creating master can already be dead 1.11 - */ 1.12 - //VMS__free_in_lib( animatingPr->startOfStack, animatingPr ); 1.13 - //VMS__free_in_lib( animatingPr, animatingPr); 1.14 + 1.15 + VMS__free( animatingPr->startOfStack); 1.16 + VMS__free( animatingPr); 1.17 } 1.18 1.19 1.20 @@ -664,14 +660,12 @@ 1.21 void 1.22 VMS__shutdown() 1.23 { int coreIdx; 1.24 - VirtProcr *shutDownPr; 1.25 - 1.26 - //create the shutdown processors, one for each core loop -- put them 1.27 - // directly into the Q -- each core will die when gets one 1.28 + //Send a shutdown Request to all MasterLoops. 1.29 for( coreIdx=0; coreIdx < NUM_CORES; coreIdx++ ) 1.30 { //Note, this is running in the master 1.31 - shutDownPr = VMS__create_procr( &endOSThreadFn, NULL ); 1.32 - writeVMSQ( shutDownPr, _VMSMasterEnv->readyToAnimateQs[coreIdx] ); 1.33 + InterVMSCoreReqst *shutdownReqst = VMS__malloc(sizeof(InterVMSCoreReqst)); 1.34 + shutdownReqst->secondReqType = shutdownVP; 1.35 + sendInterMasterReqst(coreIdx, (InterMasterReqst*)shutdownReqst); 1.36 } 1.37 1.38 } 1.39 @@ -690,6 +684,7 @@ 1.40 * to core loop function -- note that this slices out a level of virtual 1.41 * processors). 1.42 */ 1.43 +/* 1.44 void 1.45 endOSThreadFn( void *initData, VirtProcr *animatingPr ) 1.46 { 1.47 @@ -699,6 +694,7 @@ 1.48 asmTerminateCoreLoop(animatingPr); 1.49 #endif 1.50 } 1.51 + */ 1.52 1.53 1.54 /*This is called from the startup & shutdown
