--- libaitsched/inc/aitsched.h 2012/08/21 11:07:16 1.14.2.1 +++ libaitsched/inc/aitsched.h 2012/08/21 11:45:34 1.14.2.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitsched.h,v 1.14.2.1 2012/08/21 11:07:16 misho Exp $ +* $Id: aitsched.h,v 1.14.2.2 2012/08/21 11:45:34 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -53,6 +53,7 @@ SUCH DAMAGE. #include #include #include +#include #ifdef EVFILT_LIO #include #endif @@ -173,6 +174,10 @@ struct sched_Task { #define TASK_ROOT(x) (x)->task_root sched_task_func_t task_func; #define TASK_FUNC(x) (x)->task_func + intptr_t task_ret; +#define TASK_RET(x) (x)->task_ret + unsigned int task_flag; +#define TASK_FLAG(x) (x)->task_flag void *task_arg; union { @@ -636,7 +641,8 @@ sched_task_t *schedThread(sched_root_task_t * __restri */ #define taskExit(t, x) do { assert((t) && TASK_ROOT(t)); \ if (TASK_ROOT(t)->root_hooks.hook_exec.exit) \ - TASK_ROOT(t)->root_hooks.hook_exec.exit((t), (x)); \ + TASK_ROOT(t)->root_hooks.hook_exec.exit((t), \ + (void*) (x)); \ TASK_ROOT(t)->root_ret = (void*) (x); \ if (TASK_TYPE(t) == taskTHREAD) \ pthread_exit((void*) (x)); \