--- libaitsched/inc/aitsched.h 2013/11/21 14:31:14 1.23.4.1 +++ libaitsched/inc/aitsched.h 2014/01/27 16:52:56 1.24.2.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitsched.h,v 1.23.4.1 2013/11/21 14:31:14 misho Exp $ +* $Id: aitsched.h,v 1.24.2.2 2014/01/27 16:52:56 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -49,7 +49,7 @@ SUCH DAMAGE. #include #include -#include +#include #include #include #include @@ -194,6 +194,9 @@ struct sched_Task { #define TASK_FD(x) (x)->task_val.fd #define TASK_TS(x) (x)->task_val.ts +#define TASK_TS2TV(x, tvp) (assert((tvp)), (tvp)->tv_sec = (x)->task_val.ts.tv_sec, \ + (tvp)->tv_usec = (x)->task_val.ts.tv_nsec / 1000) + struct iovec task_data; #define TASK_DATA(x) (x)->task_data.iov_base #define TASK_DATLEN(x) (x)->task_data.iov_len @@ -211,9 +214,15 @@ typedef TAILQ_HEAD(, sched_Task) sched_queue_t; /* root task */ struct sched_RootTask { int root_kq; - unsigned long root_miss; +#ifndef KQ_DISABLE struct timespec root_wait; struct timespec root_poll; +#else + fd_set root_fds[2]; + struct timeval root_wait; + struct timeval root_poll; +#endif + unsigned long root_miss; intptr_t root_cond; void *root_ret; @@ -648,7 +657,7 @@ sched_task_t *schedSuspend(sched_root_task_t * __restr * * @root = root task * @criteria = find task by criteria - * [ CRITERIA_ANY|CRITERIA_ID|CRITERIA_DATA ] + * [ CRITERIA_ANY|CRITERIA_ID|CRITERIA_VAL|CRITERIA_DATA ] * @param = search parameter (sched_task_t *task| unsigned long id) * return: -1 error or 0 resumed ok */