Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VSs_impls > VSs__MC_shared_impl
comparison VSs.c @ 11:ed268fc7376a
minor fixes
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Wed, 15 Aug 2012 17:05:02 +0200 |
| parents | 832bc715fbf2 |
| children | f56e3beac86b |
comparison
equal
deleted
inserted
replaced
| 8:5e76e5c2e64b | 10:e8375dd2bff3 |
|---|---|
| 94 // is dissipated. | 94 // is dissipated. |
| 95 threadTaskStub = create_thread_task_stub( initData ); | 95 threadTaskStub = create_thread_task_stub( initData ); |
| 96 parentTaskStub = create_thread_task_stub( NULL ); | 96 parentTaskStub = create_thread_task_stub( NULL ); |
| 97 parentTaskStub->isEnded = TRUE; | 97 parentTaskStub->isEnded = TRUE; |
| 98 parentTaskStub->numLiveChildThreads = 1; //so dissipate works for seed | 98 parentTaskStub->numLiveChildThreads = 1; //so dissipate works for seed |
| 99 threadTaskStub->parentTasksStub = parentTaskStub; | 99 threadTaskStub->parentTaskStub = parentTaskStub; |
| 100 | 100 |
| 101 semData = (VSsSemData *)seedSlv->semanticData; | 101 semData = (VSsSemData *)seedSlv->semanticData; |
| 102 //seedVP is a thread, so has a permanent task | 102 //seedVP is a thread, so has a permanent task |
| 103 semData->needsTaskAssigned = FALSE; | 103 semData->needsTaskAssigned = FALSE; |
| 104 semData->taskStub = threadTaskStub; | 104 semData->taskStub = threadTaskStub; |
| 429 */ | 429 */ |
| 430 void | 430 void |
| 431 VSs__end_thread( SlaveVP *thdToEnd ) | 431 VSs__end_thread( SlaveVP *thdToEnd ) |
| 432 { VSsSemData *semData; | 432 { VSsSemData *semData; |
| 433 | 433 |
| 434 //check whether all sub-tasks have ended.. if not, don't free the | |
| 435 // semantic data nor task stub of this thread. | |
| 436 semData = (VSsSemData *)thdToEnd->semanticData; | |
| 437 if( semData->taskStub->numLiveChildTasks != 0 ) | |
| 438 { | |
| 439 fix_me(); | |
| 440 } | |
| 441 | 434 |
| 442 //Update the count of live sub-tasks in parent. If parent was a | 435 //Update the count of live sub-tasks in parent. If parent was a |
| 443 // thread and has already ended, then if this was the last sub-task, | 436 // thread and has already ended, then if this was the last sub-task, |
| 444 // free the semantic data and task stub of the parent. | 437 // free the semantic data and task stub of the parent. |
| 445 | 438 |
