Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VSs_impls > VSs__MC_shared_impl
diff VSs.c @ 33:227db52cbd93
VSs working
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Wed, 06 Mar 2013 14:32:33 +0100 |
| parents | 3787df8b95f9 |
| children | c8d4f6d3c7d3 |
line diff
1.1 --- a/VSs.c Fri Feb 01 17:18:57 2013 +0100 1.2 +++ b/VSs.c Wed Mar 06 14:32:33 2013 +0100 1.3 @@ -209,7 +209,7 @@ 1.4 VSs__init_counter_data_structs(); 1.5 #endif 1.6 1.7 - semanticEnv->shutdownInitiated = FALSE; 1.8 + //semanticEnv->shutdownInitiated = FALSE; 1.9 semanticEnv->coreIsDone = VMS_int__malloc( NUM_CORES * sizeof( bool32 ) ); 1.10 semanticEnv->numCoresDone = 0; 1.11 //For each animation slot, there is an idle slave, and an initial 1.12 @@ -245,7 +245,7 @@ 1.13 semanticEnv->freeExtraTaskSlvQ = makeVMSQ(); 1.14 semanticEnv->taskReadyQ = makeVMSQ(); 1.15 1.16 - semanticEnv->argPtrHashTbl = makeHashTable32( 16, &VMS_int__free ); 1.17 + semanticEnv->argPtrHashTbl = makeHashTable32( 20, &free_pointer_entry ); 1.18 semanticEnv->commHashTbl = makeHashTable32( 16, &VMS_int__free ); 1.19 1.20 semanticEnv->nextCoreToGetNewSlv = 0; 1.21 @@ -424,33 +424,39 @@ 1.22 #endif 1.23 /* It's all allocated inside VMS's big chunk -- that's about to be freed, so 1.24 * nothing to do here */ 1.25 -/* 1.26 + //_VMSMasterEnv->shutdownInitiated = TRUE; 1.27 int coreIdx, slotIdx; 1.28 SlaveVP* slotSlv; 1.29 for (coreIdx = 0; coreIdx < NUM_CORES; coreIdx++) { 1.30 for (slotIdx = 0; slotIdx < NUM_ANIM_SLOTS; slotIdx++) { 1.31 slotSlv = semanticEnv->slotTaskSlvs[coreIdx][slotIdx]; 1.32 VMS_int__free(slotSlv->semanticData); 1.33 - VMS_int__free( slotSlv->startOfStack ); 1.34 - VMS_int__free( slotSlv ); 1.35 + VMS_int__dissipate_slaveVP(slotSlv); 1.36 #ifdef IDLE_SLAVES 1.37 slotSlv = semanticEnv->idleSlv[coreIdx][slotIdx]; 1.38 VMS_int__free(slotSlv->semanticData); 1.39 - VMS_int__free( slotSlv->startOfStack ); 1.40 - VMS_int__free( slotSlv ); 1.41 + VMS_int__dissipate_slaveVP(slotSlv); 1.42 #endif 1.43 } 1.44 } 1.45 + int i; 1.46 + for (i = 0; i < NUM_STRUCS_IN_SEM_ENV; i++) { 1.47 + freePrivQ(semanticEnv->fnSingletons[i].waitQ); 1.48 + freePrivQ(semanticEnv->transactionStrucs[i].waitingVPQ); 1.49 + freePrivQ(semanticEnv->criticalSection[i].waitQ); 1.50 + } 1.51 1.52 freePrivQ(semanticEnv->freeExtraTaskSlvQ); 1.53 freePrivQ(semanticEnv->slavesReadyToResumeQ); 1.54 freePrivQ(semanticEnv->taskReadyQ); 1.55 - freeHashTable( semanticEnv->argPtrHashTbl ); 1.56 - freeHashTable( semanticEnv->commHashTbl ); 1.57 - VMS_int__free( _VMSMasterEnv->semanticEnv ); 1.58 - */ 1.59 - VMS_SS__cleanup_at_end_of_shutdown(); 1.60 - } 1.61 + freePrivQ(semanticEnv->deferredSubmitsQ); 1.62 + freeHashTable(semanticEnv->argPtrHashTbl); 1.63 + freeHashTable(semanticEnv->commHashTbl); 1.64 + VMS_int__free(semanticEnv->coreIsDone); 1.65 + VMS_int__free(_VMSMasterEnv->semanticEnv); 1.66 + 1.67 + VMS_SS__cleanup_at_end_of_shutdown(); 1.68 +} 1.69 1.70 1.71 //===========================================================================
