version 1.24.4.4, 2014/01/28 10:08:18
|
version 1.24.4.5, 2014/01/28 10:37:19
|
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 539 sched_hook_proc(void *task, void *arg __unused)
|
Line 546 sched_hook_proc(void *task, void *arg __unused)
|
void * |
void * |
sched_hook_signal(void *task, void *arg __unused) |
sched_hook_signal(void *task, void *arg __unused) |
{ |
{ |
#ifndef KQ_DISABLE |
|
sched_task_t *t = task; |
sched_task_t *t = task; |
|
#ifndef KQ_DISABLE |
struct kevent chg[1]; |
struct kevent chg[1]; |
struct timespec timeout = { 0, 0 }; |
struct timespec timeout = { 0, 0 }; |
|
|
Line 562 sched_hook_signal(void *task, void *arg __unused)
|
Line 569 sched_hook_signal(void *task, void *arg __unused)
|
LOGERR; |
LOGERR; |
return (void*) -1; |
return (void*) -1; |
} |
} |
|
#else |
|
struct sigaction sa; |
|
|
|
memset(&sa, 0, sizeof sa); |
|
sigemptyset(&sa.sa_mask); |
|
sa.sa_handler = _sched_sigHandler; |
|
sa.sa_flags = SA_RESETHAND | SA_RESTART; |
|
|
|
if (sigaction(TASK_VAL(t), &sa, NULL) == -1) { |
|
if (TASK_ROOT(t)->root_hooks.hook_exec.exception) |
|
TASK_ROOT(t)->root_hooks.hook_exec.exception(TASK_ROOT(t), NULL); |
|
else |
|
LOGERR; |
|
return (void*) -1; |
|
} |
#endif |
#endif |
return NULL; |
return NULL; |
} |
} |