Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VSs_impls > VSs__MC_shared_impl
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 20:8b793bc2312c | 27:cf26c0bfa329 |
|---|---|
| 207 #ifdef HOLISTIC__TURN_ON_PERF_COUNTERS | 207 #ifdef HOLISTIC__TURN_ON_PERF_COUNTERS |
| 208 _VMSMasterEnv->counterHandler = &VSs__counter_handler; | 208 _VMSMasterEnv->counterHandler = &VSs__counter_handler; |
| 209 VSs__init_counter_data_structs(); | 209 VSs__init_counter_data_structs(); |
| 210 #endif | 210 #endif |
| 211 | 211 |
| 212 semanticEnv->shutdownInitiated = FALSE; | 212 //semanticEnv->shutdownInitiated = FALSE; |
| 213 semanticEnv->coreIsDone = VMS_int__malloc( NUM_CORES * sizeof( bool32 ) ); | 213 semanticEnv->coreIsDone = VMS_int__malloc( NUM_CORES * sizeof( bool32 ) ); |
| 214 semanticEnv->numCoresDone = 0; | 214 semanticEnv->numCoresDone = 0; |
| 215 //For each animation slot, there is an idle slave, and an initial | 215 //For each animation slot, there is an idle slave, and an initial |
| 216 // slave assigned as the current-task-slave. Create them here. | 216 // slave assigned as the current-task-slave. Create them here. |
| 217 SlaveVP *idleSlv, *slotTaskSlv; | 217 SlaveVP *idleSlv, *slotTaskSlv; |
| 243 //create the ready queues, hash tables used for matching and so forth | 243 //create the ready queues, hash tables used for matching and so forth |
| 244 semanticEnv->slavesReadyToResumeQ = makeVMSQ(); | 244 semanticEnv->slavesReadyToResumeQ = makeVMSQ(); |
| 245 semanticEnv->freeExtraTaskSlvQ = makeVMSQ(); | 245 semanticEnv->freeExtraTaskSlvQ = makeVMSQ(); |
| 246 semanticEnv->taskReadyQ = makeVMSQ(); | 246 semanticEnv->taskReadyQ = makeVMSQ(); |
| 247 | 247 |
| 248 semanticEnv->argPtrHashTbl = makeHashTable32( 16, &VMS_int__free ); | 248 semanticEnv->argPtrHashTbl = makeHashTable32( 20, &free_pointer_entry ); |
| 249 semanticEnv->commHashTbl = makeHashTable32( 16, &VMS_int__free ); | 249 semanticEnv->commHashTbl = makeHashTable32( 16, &VMS_int__free ); |
| 250 | 250 |
| 251 semanticEnv->nextCoreToGetNewSlv = 0; | 251 semanticEnv->nextCoreToGetNewSlv = 0; |
| 252 | 252 |
| 253 semanticEnv->numInFlightTasks = 0; | 253 semanticEnv->numInFlightTasks = 0; |
| 422 } | 422 } |
| 423 | 423 |
| 424 #endif | 424 #endif |
| 425 /* It's all allocated inside VMS's big chunk -- that's about to be freed, so | 425 /* It's all allocated inside VMS's big chunk -- that's about to be freed, so |
| 426 * nothing to do here */ | 426 * nothing to do here */ |
| 427 /* | 427 //_VMSMasterEnv->shutdownInitiated = TRUE; |
| 428 int coreIdx, slotIdx; | 428 int coreIdx, slotIdx; |
| 429 SlaveVP* slotSlv; | 429 SlaveVP* slotSlv; |
| 430 for (coreIdx = 0; coreIdx < NUM_CORES; coreIdx++) { | 430 for (coreIdx = 0; coreIdx < NUM_CORES; coreIdx++) { |
| 431 for (slotIdx = 0; slotIdx < NUM_ANIM_SLOTS; slotIdx++) { | 431 for (slotIdx = 0; slotIdx < NUM_ANIM_SLOTS; slotIdx++) { |
| 432 slotSlv = semanticEnv->slotTaskSlvs[coreIdx][slotIdx]; | 432 slotSlv = semanticEnv->slotTaskSlvs[coreIdx][slotIdx]; |
| 433 VMS_int__free(slotSlv->semanticData); | 433 VMS_int__free(slotSlv->semanticData); |
| 434 VMS_int__free( slotSlv->startOfStack ); | 434 VMS_int__dissipate_slaveVP(slotSlv); |
| 435 VMS_int__free( slotSlv ); | |
| 436 #ifdef IDLE_SLAVES | 435 #ifdef IDLE_SLAVES |
| 437 slotSlv = semanticEnv->idleSlv[coreIdx][slotIdx]; | 436 slotSlv = semanticEnv->idleSlv[coreIdx][slotIdx]; |
| 438 VMS_int__free(slotSlv->semanticData); | 437 VMS_int__free(slotSlv->semanticData); |
| 439 VMS_int__free( slotSlv->startOfStack ); | 438 VMS_int__dissipate_slaveVP(slotSlv); |
| 440 VMS_int__free( slotSlv ); | |
| 441 #endif | 439 #endif |
| 442 } | 440 } |
| 443 } | 441 } |
| 442 int i; | |
| 443 for (i = 0; i < NUM_STRUCS_IN_SEM_ENV; i++) { | |
| 444 freePrivQ(semanticEnv->fnSingletons[i].waitQ); | |
| 445 freePrivQ(semanticEnv->transactionStrucs[i].waitingVPQ); | |
| 446 freePrivQ(semanticEnv->criticalSection[i].waitQ); | |
| 447 } | |
| 444 | 448 |
| 445 freePrivQ(semanticEnv->freeExtraTaskSlvQ); | 449 freePrivQ(semanticEnv->freeExtraTaskSlvQ); |
| 446 freePrivQ(semanticEnv->slavesReadyToResumeQ); | 450 freePrivQ(semanticEnv->slavesReadyToResumeQ); |
| 447 freePrivQ(semanticEnv->taskReadyQ); | 451 freePrivQ(semanticEnv->taskReadyQ); |
| 448 freeHashTable( semanticEnv->argPtrHashTbl ); | 452 freePrivQ(semanticEnv->deferredSubmitsQ); |
| 449 freeHashTable( semanticEnv->commHashTbl ); | 453 freeHashTable(semanticEnv->argPtrHashTbl); |
| 450 VMS_int__free( _VMSMasterEnv->semanticEnv ); | 454 freeHashTable(semanticEnv->commHashTbl); |
| 451 */ | 455 VMS_int__free(semanticEnv->coreIsDone); |
| 452 VMS_SS__cleanup_at_end_of_shutdown(); | 456 VMS_int__free(_VMSMasterEnv->semanticEnv); |
| 453 } | 457 |
| 458 VMS_SS__cleanup_at_end_of_shutdown(); | |
| 459 } | |
| 454 | 460 |
| 455 | 461 |
| 456 //=========================================================================== | 462 //=========================================================================== |
| 457 | 463 |
| 458 SlaveVP * | 464 SlaveVP * |
