|
version 1.29.4.1, 2022/11/28 23:29:59
|
version 1.31, 2023/02/25 15:55:01
|
|
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 - 2022 | Copyright 2004 - 2023 |
| 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 172 schedReadExt(sched_root_task_t * __restrict root, sche
|
Line 172 schedReadExt(sched_root_task_t * __restrict root, sche
|
| TASK_DATA(task) = opt_data; |
TASK_DATA(task) = opt_data; |
| TASK_DATLEN(task) = opt_dlen; |
TASK_DATLEN(task) = opt_dlen; |
| |
|
| TASK_HARG(task) = (void*) mask; | TASK_HARG(task) = mask; |
| |
|
| if (root->root_hooks.hook_add.read) |
if (root->root_hooks.hook_add.read) |
| ptr = root->root_hooks.hook_add.read(task, task->task_harg); | ptr = root->root_hooks.hook_add.read(task, |
| | (void*) task->task_harg); |
| else |
else |
| ptr = NULL; |
ptr = NULL; |
| |
|
|
Line 202 sched_task_t *
|
Line 203 sched_task_t *
|
| schedWrite(sched_root_task_t * __restrict root, sched_task_func_t func, void *arg, int fd, |
schedWrite(sched_root_task_t * __restrict root, sched_task_func_t func, void *arg, int fd, |
| void *opt_data, size_t opt_dlen) |
void *opt_data, size_t opt_dlen) |
| { |
{ |
| |
return schedWriteExt(root, func, arg, fd, opt_data, opt_dlen, 0); |
| |
} |
| |
|
| |
/* |
| |
* schedWriteExt() - Add WRITE I/O task to scheduler queue with custom event mask |
| |
* |
| |
* @root = root task |
| |
* @func = task execution function |
| |
* @arg = 1st func argument |
| |
* @fd = fd handle |
| |
* @opt_data = Optional data |
| |
* @opt_dlen = Optional data length |
| |
* @mask = Event mask |
| |
* return: NULL error or !=NULL new queued task |
| |
*/ |
| |
sched_task_t * |
| |
schedWriteExt(sched_root_task_t * __restrict root, sched_task_func_t func, void *arg, int fd, |
| |
void *opt_data, size_t opt_dlen, u_long mask) |
| |
{ |
| sched_task_t *task; |
sched_task_t *task; |
| void *ptr; |
void *ptr; |
| |
|
|
Line 222 schedWrite(sched_root_task_t * __restrict root, sched_
|
Line 242 schedWrite(sched_root_task_t * __restrict root, sched_
|
| TASK_DATA(task) = opt_data; |
TASK_DATA(task) = opt_data; |
| TASK_DATLEN(task) = opt_dlen; |
TASK_DATLEN(task) = opt_dlen; |
| |
|
| |
TASK_HARG(task) = mask; |
| |
|
| if (root->root_hooks.hook_add.write) |
if (root->root_hooks.hook_add.write) |
| ptr = root->root_hooks.hook_add.write(task, NULL); | ptr = root->root_hooks.hook_add.write(task, |
| | (void*) task->task_harg); |
| else |
else |
| ptr = NULL; |
ptr = NULL; |
| |
|
|
Line 472 sched_task_t *
|
Line 495 sched_task_t *
|
| schedSignal(sched_root_task_t * __restrict root, sched_task_func_t func, void *arg, u_long sig, |
schedSignal(sched_root_task_t * __restrict root, sched_task_func_t func, void *arg, u_long sig, |
| void *opt_data, size_t opt_dlen) |
void *opt_data, size_t opt_dlen) |
| { |
{ |
| #if SUP_ENABLE != KQ_SUPPORT |
|
| sched_SetErr(ENOTSUP, "disabled kqueue support"); |
|
| return NULL; |
|
| #else |
|
| sched_task_t *task; |
sched_task_t *task; |
| void *ptr; |
void *ptr; |
| |
|
|
Line 507 schedSignal(sched_root_task_t * __restrict root, sched
|
Line 526 schedSignal(sched_root_task_t * __restrict root, sched
|
| task = sched_unuseTask(task); |
task = sched_unuseTask(task); |
| |
|
| return task; |
return task; |
| #endif /* KQ_SUPPORT */ |
|
| } |
} |
| |
|
| /* |
/* |