version 1.2.2.2, 2011/10/04 13:50:05
|
version 1.2.2.4, 2011/10/04 23:03:32
|
Line 316 retry:
|
Line 316 retry:
|
if ((en = kevent(r->root_kq, NULL, 0, res, KQ_EVENTS, timeout)) == -1) { |
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) { |
if (r->root_hooks.hook_exec.exception(r, NULL)) |
if (r->root_hooks.hook_exec.exception(r, NULL)) |
return NULL; /* exit from scheduler */ | return NULL; |
} else |
} else |
LOGERR; |
LOGERR; |
#ifdef NDEBUG |
#ifdef NDEBUG |
Line 337 retry:
|
Line 337 retry:
|
switch (res[i].filter) { |
switch (res[i].filter) { |
case EVFILT_READ: |
case EVFILT_READ: |
TAILQ_FOREACH(task, &r->root_read, task_node) { |
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; |
continue; |
/* remove read handle */ |
/* remove read handle */ |
io = ROOT_DATA(task->task_root); |
io = ROOT_DATA(task->task_root); |
Line 361 retry:
|
Line 361 retry:
|
break; |
break; |
case EVFILT_WRITE: |
case EVFILT_WRITE: |
TAILQ_FOREACH(task, &r->root_write, task_node) { |
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; |
continue; |
/* remove write handle */ |
/* remove write handle */ |
io = ROOT_DATA(task->task_root); |
io = ROOT_DATA(task->task_root); |
Line 387 retry:
|
Line 387 retry:
|
if (kevent(r->root_kq, evt, 1, NULL, 0, &nw) == -1) { |
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) { |
if (r->root_hooks.hook_exec.exception(r, NULL)) |
if (r->root_hooks.hook_exec.exception(r, NULL)) |
return NULL; /* exit from scheduler */ | return NULL; |
} else |
} else |
LOGERR; |
LOGERR; |
} |
} |
Line 451 sched_hook_exception(void *root, void *arg)
|
Line 451 sched_hook_exception(void *root, void *arg)
|
|
|
/* if error hook exists */ |
/* if error hook exists */ |
if (r->root_hooks.hook_root.error) |
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! */ |
/* default case! */ |
LOGERR; |
LOGERR; |