--- libaitsched/inc/aitsched.h 2012/01/08 00:51:17 1.4 +++ libaitsched/inc/aitsched.h 2012/01/08 02:01:41 1.4.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitsched.h,v 1.4 2012/01/08 00:51:17 misho Exp $ +* $Id: aitsched.h,v 1.4.2.1 2012/01/08 02:01:41 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -148,10 +148,15 @@ struct sched_Task { }; typedef TAILQ_HEAD(, sched_Task) sched_queue_t; +/* root lock helpers */ +#define ROOT_QLOCK(x, q) (pthread_mutex_lock(&(x)->root_mtx[(q)])) +#define ROOT_QUNLOCK(x, q) (pthread_mutex_unlock(&(x)->root_mtx[(q)])) + /* root task */ struct sched_RootTask { int root_kq; struct timeval root_wait; + pthread_mutex_t root_mtx[taskMAX]; sched_queue_t root_read; sched_queue_t root_write;