--- libaitsched/src/tasks.c 2014/01/28 13:17:33 1.23 +++ libaitsched/src/tasks.c 2014/05/21 21:11:29 1.24.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: tasks.c,v 1.23 2014/01/28 13:17:33 misho Exp $ +* $Id: tasks.c,v 1.24.2.1 2014/05/21 21:11:29 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -146,7 +146,7 @@ _sched_threadWrapper(sched_task_t *t) } #endif -#if defined(HAVE_TIMER_CREATE) && defined(HAVE_TIMER_SETTIME) +#if defined(HAVE_TIMER_CREATE) && defined(HAVE_TIMER_SETTIME) && defined(HAVE_TIMER_DELETE) void * _sched_rtcWrapper(sched_task_t *t) { @@ -1330,7 +1330,7 @@ schedThread(sched_root_task_t * __restrict root, sched TASK_DATLEN(task) = opt_dlen; pthread_attr_init(&attr); - pthread_attr_setdetachstate(&attr, PTHREAD_DETACHED); + pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); if (ss && (errno = pthread_attr_setstacksize(&attr, ss))) { LOGERR; pthread_attr_destroy(&attr); @@ -1381,7 +1381,7 @@ sched_task_t * schedRTC(sched_root_task_t * __restrict root, sched_task_func_t func, void *arg, struct timespec ts, void *opt_data, size_t opt_dlen) { -#if defined(HAVE_TIMER_CREATE) && defined(HAVE_TIMER_SETTIME) +#if defined(HAVE_TIMER_CREATE) && defined(HAVE_TIMER_SETTIME) && defined(HAVE_TIMER_DELETE) sched_task_t *task; void *ptr;