--- libaitsched/src/tasks.c 2013/08/15 19:06:20 1.16.6.4 +++ 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.16.6.4 2013/08/15 19:06:20 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 @@ -152,6 +152,27 @@ _sched_threadWrapper(sched_task_t *t) } #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 + #pragma GCC visibility pop /* @@ -1330,7 +1351,7 @@ schedThread(sched_root_task_t * __restrict root, sched * @arg = 1st func argument * @ts = timeout argument structure, minimum alarm timer resolution is 1msec! * @opt_data = Optional RTC ID - * @opt_dlen = Optional Signal No. + * @opt_dlen = Optional data length * return: NULL error or !=NULL new queued task */ sched_task_t *