- fixed a bug in pause handling of environment controller.
- added code to triple axis MAD emulation layer
This commit is contained in:
19
task.c
19
task.c
@ -180,6 +180,20 @@
|
||||
self->pCurrent = self->pHead;
|
||||
}
|
||||
}
|
||||
/*-------------------------------------------------------------------------*/
|
||||
static int TaskExist(pTaskMan self, long lID)
|
||||
{
|
||||
pTaskHead pCur = self->pHead;
|
||||
while(pCur != NULL)
|
||||
{
|
||||
if(pCur->lID == lID)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
pCur = pCur->pNext;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/*--------------------------------------------------------------------------*/
|
||||
int TaskSchedule(pTaskMan self)
|
||||
{
|
||||
@ -252,6 +266,11 @@
|
||||
else
|
||||
{
|
||||
IncrTaskPointer(self);
|
||||
}
|
||||
if(self->pCurrent == self->pHead)
|
||||
{
|
||||
if(!TaskExist(self,lID))
|
||||
goto ente;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user