--- libaitsched/src/hooks.c 2013/08/26 14:29:20 1.21.4.1 +++ libaitsched/src/hooks.c 2013/11/14 21:35:43 1.23.4.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: hooks.c,v 1.21.4.1 2013/08/26 14:29:20 misho Exp $ +* $Id: hooks.c,v 1.23.4.1 2013/11/14 21:35:43 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); @@ -1182,9 +1184,6 @@ sched_hook_rtc(void *task, void *arg __unused) timer_delete(tmr); return (void*) -1; } - - if (!TASK_ISLOCKED(t)) - TASK_LOCK(t); return NULL; }