--- libaitsched/src/tasks.c 2013/08/22 15:28:04 1.18 +++ libaitsched/src/tasks.c 2013/08/26 08:20:55 1.19 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: tasks.c,v 1.18 2013/08/22 15:28:04 misho Exp $ +* $Id: tasks.c,v 1.19 2013/08/26 08:20:55 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -149,6 +149,27 @@ _sched_threadWrapper(sched_task_t *t) pthread_cleanup_pop(42); TASK_ROOT(t)->root_ret = ret; pthread_exit(ret); +} +#endif + +#if defined(HAVE_TIMER_CREATE) && defined(HAVE_TIMER_SETTIME) +void * +_sched_rtcWrapper(sched_task_t *t) +{ + void *ret = NULL; + sched_task_func_t func; + sched_task_t *task; + + if (!t || !TASK_ROOT(t) || !TASK_DATA(t)) + return NULL; + else { + task = (sched_task_t*) TASK_DATA(t); + func = TASK_FUNC(task); + } + + ret = func(task); + timer_delete((timer_t) TASK_DATLEN(t)); + return ret; } #endif