diff --git a/task.c b/task.c index 235917bc..e41b99d7 100644 --- a/task.c +++ b/task.c @@ -327,12 +327,14 @@ ente: int TaskSignal(pTaskMan self, int iSignal, void *pSigData) { pTaskHead pTemp, pEnd; + int myStatus = self->pCurrent->iStatus; assert(self); assert(self->iID == TASKERID); /* Do one cycle until we are at the caller, then return to him*/ pEnd = self->pCurrent; + pEnd->iStatus = WAITING; IncrTaskPointer(self); while(self->pCurrent != pEnd) { @@ -343,6 +345,7 @@ ente: IncrTaskPointer(self); } /* finally, tell me about the thingie as well */ + pEnd->iStatus = myStatus; if(pEnd->pSignal) { pEnd->pSignal(pEnd->pData, iSignal, pSigData);