|
version 1.27.2.9, 2014/06/05 22:22:46
|
version 1.30.4.2, 2016/09/29 13:43:10
|
|
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 - 2014 | Copyright 2004 - 2016 |
| 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 88 _sched_threadWrapper(sched_task_t *t)
|
Line 88 _sched_threadWrapper(sched_task_t *t)
|
| } |
} |
| #endif |
#endif |
| |
|
| #if defined(HAVE_TIMER_CREATE) && defined(HAVE_TIMER_SETTIME) && defined(HAVE_TIMER_DELETE) | #if defined(HAVE_LIBRT) && defined(HAVE_TIMER_CREATE) && \ |
| | defined(HAVE_TIMER_SETTIME) && defined(HAVE_TIMER_DELETE) |
| #if SUP_ENABLE == KQ_SUPPORT |
#if SUP_ENABLE == KQ_SUPPORT |
| static void * |
static void * |
| _sched_rtcWrapper(sched_task_t *t) |
_sched_rtcWrapper(sched_task_t *t) |
|
Line 466 sched_hook_cancel(void *task, void *arg __unused)
|
Line 467 sched_hook_cancel(void *task, void *arg __unused)
|
| } |
} |
| #endif |
#endif |
| return NULL; |
return NULL; |
| #if defined(HAVE_TIMER_CREATE) && defined(HAVE_TIMER_SETTIME) && defined(HAVE_TIMER_DELETE) | #if defined(HAVE_LIBRT) && defined(HAVE_TIMER_CREATE) && \ |
| | defined(HAVE_TIMER_SETTIME) && defined(HAVE_TIMER_DELETE) |
| case taskRTC: |
case taskRTC: |
| timer_delete((timer_t) TASK_FLAG(t)); |
timer_delete((timer_t) TASK_FLAG(t)); |
| #if SUP_ENABLE == KQ_SUPPORT |
#if SUP_ENABLE == KQ_SUPPORT |
|
Line 867 fetch_hook_kevent_proceed(int en, struct kevent *res,
|
Line 869 fetch_hook_kevent_proceed(int en, struct kevent *res,
|
| struct aiocb *acb; |
struct aiocb *acb; |
| #ifdef EVFILT_LIO |
#ifdef EVFILT_LIO |
| int l; |
int l; |
| register int j; |
|
| off_t off; |
off_t off; |
| struct aiocb **acbs; |
struct aiocb **acbs; |
| struct iovec *iv; |
struct iovec *iv; |
|
Line 1017 fetch_hook_kevent_proceed(int en, struct kevent *res,
|
Line 1018 fetch_hook_kevent_proceed(int en, struct kevent *res,
|
| iv = (struct iovec*) TASK_DATA(task); |
iv = (struct iovec*) TASK_DATA(task); |
| fd = acbs[0]->aio_fildes; |
fd = acbs[0]->aio_fildes; |
| off = acbs[0]->aio_offset; |
off = acbs[0]->aio_offset; |
| for (j = len = 0; i < TASK_DATLEN(task); len += l, i++) { | for (len = 0; i < TASK_DATLEN(task); len += l, i++) { |
| if ((iv[i].iov_len = aio_return(acbs[i])) == -1) |
if ((iv[i].iov_len = aio_return(acbs[i])) == -1) |
| l = 0; |
l = 0; |
| else |
else |
|
Line 1195 fetch_hook_select_proceed(int en, fd_set rfd, fd_set w
|
Line 1196 fetch_hook_select_proceed(int en, fd_set rfd, fd_set w
|
| insert_task_to(task, &r->root_ready); |
insert_task_to(task, &r->root_ready); |
| } |
} |
| } |
} |
| /* if match equal to 1, remove resouce */ | /* remove resouce */ |
| if (flg == 1) | if (flg) |
| FD_CLR(i, &r->root_fds[0]); |
FD_CLR(i, &r->root_fds[0]); |
| } |
} |
| |
|
|
Line 1226 fetch_hook_select_proceed(int en, fd_set rfd, fd_set w
|
Line 1227 fetch_hook_select_proceed(int en, fd_set rfd, fd_set w
|
| insert_task_to(task, &r->root_ready); |
insert_task_to(task, &r->root_ready); |
| } |
} |
| } |
} |
| /* if match equal to 1, remove resouce */ | /* remove resouce */ |
| if (flg == 1) | if (flg) |
| FD_CLR(i, &r->root_fds[1]); |
FD_CLR(i, &r->root_fds[1]); |
| } |
} |
| } |
} |
|
Line 1452 sched_hook_condition(void *root, void *arg)
|
Line 1453 sched_hook_condition(void *root, void *arg)
|
| * @arg = unused |
* @arg = unused |
| * return: <0 errors and 0 ok |
* return: <0 errors and 0 ok |
| */ |
*/ |
| #if defined(HAVE_TIMER_CREATE) && defined(HAVE_TIMER_SETTIME) && defined(HAVE_TIMER_DELETE) |
|
| void * |
void * |
| sched_hook_rtc(void *task, void *arg __unused) |
sched_hook_rtc(void *task, void *arg __unused) |
| { |
{ |
| |
#if defined(HAVE_LIBRT) && defined(HAVE_TIMER_CREATE) && \ |
| |
defined(HAVE_TIMER_SETTIME) && defined(HAVE_TIMER_DELETE) |
| sched_task_t *sigt = NULL, *t = task; |
sched_task_t *sigt = NULL, *t = task; |
| struct itimerspec its; |
struct itimerspec its; |
| struct sigevent evt; |
struct sigevent evt; |
|
Line 1521 sched_hook_rtc(void *task, void *arg __unused)
|
Line 1523 sched_hook_rtc(void *task, void *arg __unused)
|
| timer_delete(tmr); |
timer_delete(tmr); |
| return (void*) -1; |
return (void*) -1; |
| } |
} |
| #endif /* HAVE_TIMER_CREATE */ |
| return NULL; |
return NULL; |
| } |
} |
| #endif /* HAVE_TIMER_CREATE */ |
|