Added the generation of incomensurate reflections for 0,0,0 in fourmess
Applied Douglas task deletion patch Fixed a bug with repeated motor failures in interface.c
This commit is contained in:
24
task.c
24
task.c
@ -214,22 +214,28 @@ static pTaskHead MakeTaskHead(char *name, TaskFunc pTask, SignalFunc pSignal,
|
||||
static void DeleteTaskHead(pTaskHead self)
|
||||
{
|
||||
assert(self);
|
||||
void *pData;
|
||||
|
||||
if (self->pKill) {
|
||||
if (self->pData) {
|
||||
self->pKill(self->pData);
|
||||
}
|
||||
}
|
||||
if(self->name != NULL){
|
||||
free(self->name);
|
||||
}
|
||||
/* unlink */
|
||||
/* unlink first to prevent double handling when Kill calls Yield*/
|
||||
if (self->pPrevious != NULL) {
|
||||
self->pPrevious->pNext = self->pNext;
|
||||
}
|
||||
if (self->pNext != NULL) {
|
||||
self->pNext->pPrevious = self->pPrevious;
|
||||
}
|
||||
|
||||
|
||||
if (self->pKill) {
|
||||
if (self->pData) {
|
||||
pData = self->pData;
|
||||
self->pData = NULL;
|
||||
self->pKill(pData);
|
||||
}
|
||||
}
|
||||
if(self->name != NULL){
|
||||
free(self->name);
|
||||
}
|
||||
|
||||
memset(self,0,sizeof(TaskHead));
|
||||
free(self);
|
||||
}
|
||||
|
Reference in New Issue
Block a user