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:
2016-04-13 09:18:13 +02:00
parent 019dc11131
commit 96114fc803
3 changed files with 32 additions and 9 deletions

24
task.c
View File

@ -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);
}