version 1.24.4.7, 2014/01/28 12:57:52
|
version 1.25, 2014/01/28 13:17:33
|
Line 638 sched_hook_fetch(void *root, void *arg __unused)
|
Line 638 sched_hook_fetch(void *root, void *arg __unused)
|
struct timespec now, m, mtmp; |
struct timespec now, m, mtmp; |
#ifndef KQ_DISABLE |
#ifndef KQ_DISABLE |
struct kevent evt[1], res[KQ_EVENTS]; |
struct kevent evt[1], res[KQ_EVENTS]; |
struct timespec *timeout, m, mtmp; | struct timespec *timeout; |
#else |
#else |
struct timeval *timeout, tv; |
struct timeval *timeout, tv; |
fd_set rfd, wfd, xfd; |
fd_set rfd, wfd, xfd; |
Line 1142 sched_hook_fetch(void *root, void *arg __unused)
|
Line 1142 sched_hook_fetch(void *root, void *arg __unused)
|
} |
} |
#else /* end of kevent dispatcher */ |
#else /* end of kevent dispatcher */ |
for (i = 0; i < r->root_kq; i++) { |
for (i = 0; i < r->root_kq; i++) { |
if (FD_ISSET(i, &r->root_fds[0])) { | if (FD_ISSET(i, &rfd) || FD_ISSET(i, &xfd)) { |
flg = 0; |
flg = 0; |
TAILQ_FOREACH_SAFE(task, &r->root_read, task_node, tmp) { |
TAILQ_FOREACH_SAFE(task, &r->root_read, task_node, tmp) { |
if (TASK_FD(task) != i) |
if (TASK_FD(task) != i) |
continue; |
continue; |
else { |
else { |
printf("Suck the milk %d !!!\n", i); |
|
flg++; |
flg++; |
TASK_RET(task) ^= TASK_RET(task); |
TASK_RET(task) ^= TASK_RET(task); |
TASK_FLAG(task) ^= TASK_FLAG(task); |
TASK_FLAG(task) ^= TASK_FLAG(task); |
Line 1197 sched_hook_fetch(void *root, void *arg __unused)
|
Line 1196 sched_hook_fetch(void *root, void *arg __unused)
|
FD_CLR(i, &r->root_fds[0]); |
FD_CLR(i, &r->root_fds[0]); |
} |
} |
|
|
if (FD_ISSET(i, &r->root_fds[1])) { | if (FD_ISSET(i, &wfd)) { |
flg = 0; |
flg = 0; |
TAILQ_FOREACH_SAFE(task, &r->root_write, task_node, tmp) { |
TAILQ_FOREACH_SAFE(task, &r->root_write, task_node, tmp) { |
if (TASK_FD(task) != i) |
if (TASK_FD(task) != i) |
continue; |
continue; |
else { |
else { |
printf("HIT the pig %d !!!\n", i); |
|
flg++; |
flg++; |
TASK_RET(task) ^= TASK_RET(task); |
TASK_RET(task) ^= TASK_RET(task); |
TASK_FLAG(task) ^= TASK_FLAG(task); |
TASK_FLAG(task) ^= TASK_FLAG(task); |