--- libaitsched/src/aitsched.c 2012/01/24 14:34:49 1.4.2.5 +++ libaitsched/src/aitsched.c 2012/01/24 21:59:47 1.5 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitsched.c,v 1.4.2.5 2012/01/24 14:34:49 misho Exp $ +* $Id: aitsched.c,v 1.5 2012/01/24 21:59:47 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -132,6 +132,9 @@ schedInit(void ** __restrict data, size_t datlen) } else { memset(root, 0, sizeof(sched_root_task_t)); + /* INFINIT polling period by default */ + sched_timespecinf(&root->root_poll); + #ifdef HAVE_LIBPTHREAD for (i = 0; i < taskMAX; i++) if (pthread_mutex_init(&root->root_mtx[i], NULL)) { @@ -416,7 +419,7 @@ schedCancelby(sched_root_task_t * __restrict root, sch break; } } else if (criteria == CRITERIA_TV) { - if (!timespeccmp(&TASK_TS(task), (struct timespec*) param, -)) { + if (!sched_timespeccmp(&TASK_TS(task), (struct timespec*) param, -)) { flg++; break; } @@ -502,7 +505,7 @@ schedPolling(sched_root_task_t * __restrict root, stru *tsold = root->root_poll; if (!ts) - root->root_poll.tv_sec = root->root_poll.tv_nsec = -1; + sched_timespecinf(&root->root_poll); else root->root_poll = *ts;