--- libaitsched/src/aitsched.c 2012/08/22 10:33:45 1.15.2.1 +++ libaitsched/src/aitsched.c 2012/08/22 23:43:36 1.15.2.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitsched.c,v 1.15.2.1 2012/08/22 10:33:45 misho Exp $ +* $Id: aitsched.c,v 1.15.2.2 2012/08/22 23:43:36 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -215,7 +215,6 @@ schedEnd(sched_root_task_t ** __restrict root) sched_task_t *task, *tmp; #ifdef HAVE_LIBPTHREAD register int i; - pthread_t tid; #endif if (!root || !*root) @@ -247,14 +246,8 @@ schedEnd(sched_root_task_t ** __restrict root) schedCancel(task); TAILQ_FOREACH_SAFE(task, &(*root)->root_ready, task_node, tmp) schedCancel(task); - TAILQ_FOREACH_SAFE(task, &(*root)->root_thread, task_node, tmp) { - tid = (pthread_t) TASK_VAL(task); + TAILQ_FOREACH_SAFE(task, &(*root)->root_thread, task_node, tmp) schedCancel(task); -#ifdef HAVE_LIBPTHREAD - if (TASK_FLAG(task) == PTHREAD_CREATE_JOINABLE) - pthread_join(tid, NULL); -#endif - } TAILQ_FOREACH_SAFE(task, &(*root)->root_task, task_node, tmp) schedCancel(task);