version 1.24.4.5, 2014/01/28 10:37:19
|
version 1.24.4.7, 2014/01/28 12:57:52
|
Line 12 terms:
|
Line 12 terms:
|
All of the documentation and software included in the ELWIX and AITNET |
All of the documentation and software included in the ELWIX and AITNET |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org> |
|
|
Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 | Copyright 2004 - 2014 |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
by Michael Pounov <misho@elwix.org>. All rights reserved. |
|
|
Redistribution and use in source and binary forms, with or without |
Redistribution and use in source and binary forms, with or without |
Line 529 sched_hook_proc(void *task, void *arg __unused)
|
Line 529 sched_hook_proc(void *task, void *arg __unused)
|
return NULL; |
return NULL; |
} |
} |
|
|
#ifdef KQ_DISABLE |
|
static void |
|
_sched_sigHandler(int sig) |
|
{ |
|
} |
|
#endif /* KQ_DISABLE */ |
|
|
|
/* |
/* |
* sched_hook_signal() - Default SIGNAL hook |
* sched_hook_signal() - Default SIGNAL hook |
* |
* |
Line 546 _sched_sigHandler(int sig)
|
Line 539 _sched_sigHandler(int sig)
|
void * |
void * |
sched_hook_signal(void *task, void *arg __unused) |
sched_hook_signal(void *task, void *arg __unused) |
{ |
{ |
sched_task_t *t = task; |
|
#ifndef KQ_DISABLE |
#ifndef KQ_DISABLE |
|
sched_task_t *t = task; |
struct kevent chg[1]; |
struct kevent chg[1]; |
struct timespec timeout = { 0, 0 }; |
struct timespec timeout = { 0, 0 }; |
|
|
Line 570 sched_hook_signal(void *task, void *arg __unused)
|
Line 563 sched_hook_signal(void *task, void *arg __unused)
|
return (void*) -1; |
return (void*) -1; |
} |
} |
#else |
#else |
|
#if 0 |
|
sched_task_t *t = task; |
struct sigaction sa; |
struct sigaction sa; |
|
|
memset(&sa, 0, sizeof sa); |
memset(&sa, 0, sizeof sa); |
Line 584 sched_hook_signal(void *task, void *arg __unused)
|
Line 579 sched_hook_signal(void *task, void *arg __unused)
|
LOGERR; |
LOGERR; |
return (void*) -1; |
return (void*) -1; |
} |
} |
|
#endif /* 0 */ |
#endif |
#endif |
return NULL; |
return NULL; |
} |
} |
Line 645 sched_hook_fetch(void *root, void *arg __unused)
|
Line 641 sched_hook_fetch(void *root, void *arg __unused)
|
struct timespec *timeout, m, mtmp; |
struct timespec *timeout, m, mtmp; |
#else |
#else |
struct timeval *timeout, tv; |
struct timeval *timeout, tv; |
|
fd_set rfd, wfd, xfd; |
#endif |
#endif |
register int i, flg; |
register int i, flg; |
int en; |
int en; |
Line 757 sched_hook_fetch(void *root, void *arg __unused)
|
Line 754 sched_hook_fetch(void *root, void *arg __unused)
|
#ifndef KQ_DISABLE |
#ifndef KQ_DISABLE |
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) { |
#else |
#else |
if ((en = select(r->root_kq, &r->root_fds[0], &r->root_fds[1], | rfd = xfd = r->root_fds[0]; |
&r->root_fds[0], timeout)) == -1) { | wfd = r->root_fds[1]; |
| if ((en = select(r->root_kq, &rfd, &wfd, &xfd, timeout)) == -1) { |
#endif /* KQ_DISABLE */ |
#endif /* KQ_DISABLE */ |
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)) |
Line 1150 sched_hook_fetch(void *root, void *arg __unused)
|
Line 1148 sched_hook_fetch(void *root, void *arg __unused)
|
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 1204 sched_hook_fetch(void *root, void *arg __unused)
|
Line 1203 sched_hook_fetch(void *root, void *arg __unused)
|
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); |