--- libaitsched/src/aitsched.c 2012/08/21 12:54:39 1.15 +++ libaitsched/src/aitsched.c 2012/08/23 02:09:54 1.15.2.4 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitsched.c,v 1.15 2012/08/21 12:54:39 misho Exp $ +* $Id: aitsched.c,v 1.15.2.4 2012/08/23 02:09:54 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -242,13 +242,13 @@ schedEnd(sched_root_task_t ** __restrict root) schedCancel(task); TAILQ_FOREACH_SAFE(task, &(*root)->root_event, task_node, tmp) schedCancel(task); - TAILQ_FOREACH_SAFE(task, &(*root)->root_task, task_node, tmp) - schedCancel(task); TAILQ_FOREACH_SAFE(task, &(*root)->root_suspend, task_node, tmp) schedCancel(task); TAILQ_FOREACH_SAFE(task, &(*root)->root_ready, task_node, tmp) schedCancel(task); TAILQ_FOREACH_SAFE(task, &(*root)->root_thread, task_node, tmp) + schedCancel(task); + TAILQ_FOREACH_SAFE(task, &(*root)->root_task, task_node, tmp) schedCancel(task); #ifdef HAVE_LIBPTHREAD