--- libaitsched/inc/aitsched.h 2012/01/24 14:04:58 1.4.2.6 +++ libaitsched/inc/aitsched.h 2012/01/24 14:34:49 1.4.2.7 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitsched.h,v 1.4.2.6 2012/01/24 14:04:58 misho Exp $ +* $Id: aitsched.h,v 1.4.2.7 2012/01/24 14:34:49 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -161,7 +161,7 @@ typedef TAILQ_HEAD(, sched_Task) sched_queue_t; struct sched_RootTask { int root_kq; struct timespec root_wait; - struct timespec root_timeout; + struct timespec root_poll; pthread_mutex_t root_mtx[taskMAX]; sched_queue_t root_read; @@ -204,6 +204,15 @@ int schedEnd(sched_root_task_t ** __restrict root); * return: -1 error or 0 ok */ int schedRegisterHooks(sched_root_task_t * __restrict root); +/* + * schedPolling() - Polling timeout period if no timer task is present + * @root = root task + * @ts = timeout polling period, if ==NULL INFINIT timeout + * @tsold = old timeout polling if !=NULL + * return: -1 error or 0 ok + */ +inline int schedPolling(sched_root_task_t * __restrict root, + struct timespec * __restrict ts, struct timespec * __restrict tsold); /* * schedCall() - Call task execution function * @task = current task