--- libaitsched/src/hooks.c 2011/10/04 13:50:05 1.2.2.2 +++ libaitsched/src/hooks.c 2011/12/08 08:02:24 1.3 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: hooks.c,v 1.2.2.2 2011/10/04 13:50:05 misho Exp $ +* $Id: hooks.c,v 1.3 2011/12/08 08:02:24 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -316,7 +316,7 @@ retry: if ((en = kevent(r->root_kq, NULL, 0, res, KQ_EVENTS, timeout)) == -1) { if (r->root_hooks.hook_exec.exception) { if (r->root_hooks.hook_exec.exception(r, NULL)) - return NULL; /* exit from scheduler */ + return NULL; } else LOGERR; #ifdef NDEBUG @@ -337,7 +337,7 @@ retry: switch (res[i].filter) { case EVFILT_READ: TAILQ_FOREACH(task, &r->root_read, task_node) { - if (TASK_FD(task) != ((int) res[i].udata)) + if (TASK_FD(task) != ((intptr_t) res[i].udata)) continue; /* remove read handle */ io = ROOT_DATA(task->task_root); @@ -361,7 +361,7 @@ retry: break; case EVFILT_WRITE: TAILQ_FOREACH(task, &r->root_write, task_node) { - if (TASK_FD(task) != ((int) res[i].udata)) + if (TASK_FD(task) != ((intptr_t) res[i].udata)) continue; /* remove write handle */ io = ROOT_DATA(task->task_root); @@ -387,7 +387,7 @@ retry: if (kevent(r->root_kq, evt, 1, NULL, 0, &nw) == -1) { if (r->root_hooks.hook_exec.exception) { if (r->root_hooks.hook_exec.exception(r, NULL)) - return NULL; /* exit from scheduler */ + return NULL; } else LOGERR; } @@ -451,7 +451,7 @@ sched_hook_exception(void *root, void *arg) /* if error hook exists */ if (r->root_hooks.hook_root.error) - return (r->root_hooks.hook_root.error(root, (void*) errno)); + return (r->root_hooks.hook_root.error(root, (void*) ((intptr_t) errno))); /* default case! */ LOGERR;