--- libaitsched/src/aitsched.c 2014/01/27 16:52:56 1.23.2.1 +++ libaitsched/src/aitsched.c 2014/01/27 17:08:02 1.23.2.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitsched.c,v 1.23.2.1 2014/01/27 16:52:56 misho Exp $ +* $Id: aitsched.c,v 1.23.2.2 2014/01/27 17:08:02 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -150,11 +150,7 @@ schedInit(void ** __restrict data, size_t datlen) root->root_miss = MAX_TASK_MISS; /* INFINIT polling period by default */ -#ifndef KQ_DISABLE sched_timespecinf(&root->root_poll); -#else - sched_timevalinf(&root->root_poll); -#endif #ifdef HAVE_LIBPTHREAD for (i = 0; i < taskMAX; i++) @@ -339,6 +335,10 @@ schedFetch(sched_root_task_t * __restrict root) int schedTrigger(sched_task_t * __restrict task) { +#ifdef KQ_DISABLE + sched_SetErr(ENOTSUP, "disabled kqueue support"); + return -1; +#else #ifndef EVFILT_USER sched_SetErr(ENOTSUP, "Not supported kevent() filter"); return -1; @@ -361,6 +361,7 @@ schedTrigger(sched_task_t * __restrict task) return 0; #endif +#endif /* KQ_DISABLE */ } /* @@ -919,7 +920,6 @@ schedPolling(sched_root_task_t * __restrict root, stru if (!root) return -1; -#ifndef KQ_DISABLE if (tsold) *tsold = root->root_poll; @@ -927,15 +927,6 @@ schedPolling(sched_root_task_t * __restrict root, stru sched_timespecinf(&root->root_poll); else root->root_poll = *ts; -#else - if (tsold) - sched_timeval2spec(&root->root_poll, tsold); - - if (!ts) - sched_timevalinf(&root->root_poll); - else - sched_timespec2val(ts, &root->root_poll); -#endif return 0; }