--- libaitsched/src/hooks.c 2013/08/15 23:58:18 1.19.2.1 +++ libaitsched/src/hooks.c 2013/11/14 21:37:27 1.24 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: hooks.c,v 1.19.2.1 2013/08/15 23:58:18 misho Exp $ +* $Id: hooks.c,v 1.24 2013/11/14 21:37:27 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -629,9 +629,10 @@ sched_hook_fetch(void *root, void *arg __unused) return NULL; } else if (errno != EINTR) LOGERR; - return NULL; + goto skip_event; } + /* kevent dispatcher */ now.tv_sec = now.tv_nsec = 0; /* Go and catch the cat into pipes ... */ for (i = 0; i < en; i++) { @@ -1003,8 +1004,9 @@ sched_hook_fetch(void *root, void *arg __unused) } else LOGERR; } - } + } /* end of kevent dispatcher */ +skip_event: /* timer update & put in ready queue */ clock_gettime(CLOCK_MONOTONIC, &now); @@ -1158,8 +1160,8 @@ sched_hook_rtc(void *task, void *arg __unused) } else TASK_FLAG(t) = (u_long) tmr; - if (!(sigt = schedSignal(TASK_ROOT(t), TASK_FUNC(t), TASK_ARG(t), evt.sigev_signo, - TASK_DATA(t), (size_t) tmr))) { + if (!(sigt = schedSignal(TASK_ROOT(t), _sched_rtcWrapper, TASK_ARG(t), evt.sigev_signo, + t, (size_t) tmr))) { if (TASK_ROOT(t)->root_hooks.hook_exec.exception) TASK_ROOT(t)->root_hooks.hook_exec.exception(TASK_ROOT(t), NULL); else