Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VSs_impls > VSs__MC_shared_impl
changeset 11:ed268fc7376a dev_expl_VP_and_DKU
minor fixes
author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
---|---|
date | Wed, 15 Aug 2012 17:05:02 +0200 |
parents | 832bc715fbf2 |
children | f56e3beac86b |
files | VSs.c VSs.h VSs_PluginFns.c VSs_Request_Handlers.c |
diffstat | 4 files changed, 11 insertions(+), 16 deletions(-) [+] |
line diff
1.1 --- a/VSs.c Mon Aug 06 01:14:41 2012 -0700 1.2 +++ b/VSs.c Wed Aug 15 17:05:02 2012 +0200 1.3 @@ -96,7 +96,7 @@ 1.4 parentTaskStub = create_thread_task_stub( NULL ); 1.5 parentTaskStub->isEnded = TRUE; 1.6 parentTaskStub->numLiveChildThreads = 1; //so dissipate works for seed 1.7 - threadTaskStub->parentTasksStub = parentTaskStub; 1.8 + threadTaskStub->parentTaskStub = parentTaskStub; 1.9 1.10 semData = (VSsSemData *)seedSlv->semanticData; 1.11 //seedVP is a thread, so has a permanent task 1.12 @@ -431,13 +431,6 @@ 1.13 VSs__end_thread( SlaveVP *thdToEnd ) 1.14 { VSsSemData *semData; 1.15 1.16 - //check whether all sub-tasks have ended.. if not, don't free the 1.17 - // semantic data nor task stub of this thread. 1.18 - semData = (VSsSemData *)thdToEnd->semanticData; 1.19 - if( semData->taskStub->numLiveChildTasks != 0 ) 1.20 - { 1.21 - fix_me(); 1.22 - } 1.23 1.24 //Update the count of live sub-tasks in parent. If parent was a 1.25 // thread and has already ended, then if this was the last sub-task,
2.1 --- a/VSs.h Mon Aug 06 01:14:41 2012 -0700 2.2 +++ b/VSs.h Wed Aug 15 17:05:02 2012 +0200 2.3 @@ -73,7 +73,7 @@ 2.4 int32 numBlockingProp; 2.5 SlaveVP *slaveAssignedTo; 2.6 VSsPointerEntry **ptrEntries; 2.7 - void* parentTasksStub; 2.8 + void* parentTaskStub; 2.9 int32 numLiveChildTasks; 2.10 int32 numLiveChildThreads; 2.11 bool32 isWaitingForChildTasksToEnd;
3.1 --- a/VSs_PluginFns.c Mon Aug 06 01:14:41 2012 -0700 3.2 +++ b/VSs_PluginFns.c Wed Aug 15 17:05:02 2012 +0200 3.3 @@ -290,7 +290,7 @@ 3.4 //if make it to here, then is a thread slave 3.5 semEnv->numLiveThreadSlvs -= 1; //for detecting shutdown condition 3.6 ownTaskStub = semData->taskStub; 3.7 - parentTaskStub = ownTaskStub->parentTasksStub; 3.8 + parentTaskStub = ownTaskStub->parentTaskStub; 3.9 3.10 //if all children ended, then free this task's stub 3.11 // else, keep stub around, and last child will free it (below) 3.12 @@ -384,7 +384,7 @@ 3.13 newStub->args = initData; 3.14 newStub->numLiveChildTasks = 0; 3.15 newStub->numLiveChildThreads = 0; 3.16 - newStub->parentTasksStub = NULL; 3.17 + newStub->parentTaskStub = NULL; 3.18 newStub->isWaitingForChildTasksToEnd = FALSE; 3.19 newStub->isWaitingForChildThreadsToEnd = FALSE; 3.20 newStub->taskID = NULL; 3.21 @@ -439,7 +439,7 @@ 3.22 //now, create a new task and assign to the thread 3.23 semData->needsTaskAssigned = FALSE; //thread has a permanent task 3.24 semData->taskStub = create_thread_task_stub( semReq->initData ); 3.25 - semData->taskStub->parentTasksStub = parentSemData->taskStub; 3.26 + semData->taskStub->parentTaskStub = parentSemData->taskStub; 3.27 semData->slaveType = threadSlv; //this hdlr only creates thread slvs 3.28 3.29 DEBUG__printf2(dbgRqstHdlr,"Create from: %d, new VP: %d",
4.1 --- a/VSs_Request_Handlers.c Mon Aug 06 01:14:41 2012 -0700 4.2 +++ b/VSs_Request_Handlers.c Wed Aug 15 17:05:02 2012 +0200 4.3 @@ -245,7 +245,7 @@ 4.4 4.5 VSsSemData* 4.6 parentSemData = (VSsSemData*) semReq->callingSlv->semanticData; 4.7 - taskStub->parentTasksStub = (void*) parentSemData->taskStub; 4.8 + taskStub->parentTaskStub = (void*) parentSemData->taskStub; 4.9 parentSemData->taskStub->numLiveChildTasks += 1; 4.10 4.11 /*The controlled arguments are then processed one by one. 4.12 @@ -384,7 +384,7 @@ 4.13 ptrEntries = endingTaskStub->ptrEntries; //saved in stub when create 4.14 4.15 //Check if parent was waiting on this task 4.16 - parent = (VSsTaskStub *) endingTaskStub->parentTasksStub; 4.17 + parent = (VSsTaskStub *) endingTaskStub->parentTaskStub; 4.18 parent->numLiveChildTasks -= 1; 4.19 if( parent->isWaitingForChildTasksToEnd && parent->numLiveChildTasks == 0) 4.20 { 4.21 @@ -937,8 +937,10 @@ 4.22 } 4.23 else //have to wait, replace requester with new slot slv & mark waiting 4.24 { 4.25 - replaceWithNewSlotSlv( requestingSlv, semEnv ); 4.26 - 4.27 + if(semData->slaveType == slotTaskSlv || semData->slaveType == extraTaskSlv){ 4.28 + replaceWithNewSlotSlv( requestingSlv, semEnv ); 4.29 + } 4.30 + 4.31 requestingTaskStub->isWaitingForChildTasksToEnd = TRUE; 4.32 } 4.33 }