version 1.13.2.3, 2012/08/21 12:50:08
|
version 1.15, 2012/08/23 02:33:12
|
Line 110 sched_hook_cancel(void *task, void *arg __unused)
|
Line 110 sched_hook_cancel(void *task, void *arg __unused)
|
#ifdef AIO_SUPPORT |
#ifdef AIO_SUPPORT |
struct aiocb *acb; |
struct aiocb *acb; |
#ifdef EVFILT_LIO |
#ifdef EVFILT_LIO |
|
register int i = 0; |
struct aiocb **acbs; |
struct aiocb **acbs; |
register int i; |
|
#endif /* EVFILT_LIO */ |
#endif /* EVFILT_LIO */ |
#endif /* AIO_SUPPORT */ |
#endif /* AIO_SUPPORT */ |
|
|
Line 211 sched_hook_cancel(void *task, void *arg __unused)
|
Line 211 sched_hook_cancel(void *task, void *arg __unused)
|
#ifdef HAVE_LIBPTHREAD |
#ifdef HAVE_LIBPTHREAD |
pthread_cancel((pthread_t) TASK_VAL(t)); |
pthread_cancel((pthread_t) TASK_VAL(t)); |
#endif |
#endif |
TASK_UNLOCK(t); |
|
default: |
default: |
return NULL; |
return NULL; |
} |
} |
Line 233 sched_hook_thread(void *task, void *arg)
|
Line 232 sched_hook_thread(void *task, void *arg)
|
{ |
{ |
sched_task_t *t = task; |
sched_task_t *t = task; |
pthread_t tid; |
pthread_t tid; |
|
sigset_t s, o; |
|
|
if (!t || !TASK_ROOT(t)) |
if (!t || !TASK_ROOT(t)) |
return (void*) -1; |
return (void*) -1; |
|
|
|
sigfillset(&s); |
|
pthread_sigmask(SIG_BLOCK, &s, &o); |
if (pthread_create(&tid, (pthread_attr_t*) arg, |
if (pthread_create(&tid, (pthread_attr_t*) arg, |
(void *(*)(void*)) TASK_FUNC(t), t)) { | (void *(*)(void*)) _sched_threadWrapper, t)) { |
LOGERR; |
LOGERR; |
|
pthread_sigmask(SIG_SETMASK, &o, NULL); |
return (void*) -1; |
return (void*) -1; |
} | } else |
| TASK_VAL(t) = (u_long) tid; |
|
|
if (!TASK_ISLOCKED(t)) |
if (!TASK_ISLOCKED(t)) |
TASK_LOCK(t); |
TASK_LOCK(t); |
|
|
TASK_VAL(t) = (u_long) tid; | pthread_sigmask(SIG_SETMASK, &o, NULL); |
return NULL; |
return NULL; |
} |
} |
#endif |
#endif |