|
version 1.26.12.1, 2018/08/20 12:03:53
|
version 1.29, 2022/10/17 22:45:06
|
|
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 - 2018 | Copyright 2004 - 2022 |
| 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 67 sched_useTask(sched_root_task_t * __restrict root)
|
Line 67 sched_useTask(sched_root_task_t * __restrict root)
|
| SCHED_QUNLOCK(root, taskUNUSE); |
SCHED_QUNLOCK(root, taskUNUSE); |
| |
|
| if (!task) { |
if (!task) { |
| task = malloc(sizeof(sched_task_t)); | task = e_malloc(sizeof(sched_task_t)); |
| if (!task) { |
if (!task) { |
| LOGERR; |
LOGERR; |
| return NULL; |
return NULL; |
|
Line 307 schedNode2(sched_root_task_t * __restrict root, sched_
|
Line 307 schedNode2(sched_root_task_t * __restrict root, sched_
|
| TASK_DATLEN(task) = opt_dlen; |
TASK_DATLEN(task) = opt_dlen; |
| |
|
| if (root->root_hooks.hook_add.node) |
if (root->root_hooks.hook_add.node) |
| |
#ifdef __FreeBSD__ |
| ptr = root->root_hooks.hook_add.node(task, |
ptr = root->root_hooks.hook_add.node(task, |
| (void*) (NOTE_READ | NOTE_CLOSE_WRITE | NOTE_CLOSE | NOTE_OPEN)); |
(void*) (NOTE_READ | NOTE_CLOSE_WRITE | NOTE_CLOSE | NOTE_OPEN)); |
| |
#else |
| |
ptr = root->root_hooks.hook_add.node(task, NULL); |
| |
#endif |
| else |
else |
| ptr = NULL; |
ptr = NULL; |
| |
|
|
Line 627 schedAIORead(sched_root_task_t * __restrict root, sche
|
Line 631 schedAIORead(sched_root_task_t * __restrict root, sche
|
| } else |
} else |
| off = offset; |
off = offset; |
| |
|
| if (!(acb = malloc(sizeof(struct aiocb)))) { | if (!(acb = e_malloc(sizeof(struct aiocb)))) { |
| LOGERR; |
LOGERR; |
| return NULL; |
return NULL; |
| } else |
} else |
|
Line 643 schedAIORead(sched_root_task_t * __restrict root, sche
|
Line 647 schedAIORead(sched_root_task_t * __restrict root, sche
|
| |
|
| if (aio_read(acb)) { |
if (aio_read(acb)) { |
| LOGERR; |
LOGERR; |
| free(acb); | e_free(acb); |
| return NULL; |
return NULL; |
| } |
} |
| |
|
|
Line 686 schedAIOWrite(sched_root_task_t * __restrict root, sch
|
Line 690 schedAIOWrite(sched_root_task_t * __restrict root, sch
|
| } else |
} else |
| off = offset; |
off = offset; |
| |
|
| if (!(acb = malloc(sizeof(struct aiocb)))) { | if (!(acb = e_malloc(sizeof(struct aiocb)))) { |
| LOGERR; |
LOGERR; |
| return NULL; |
return NULL; |
| } else |
} else |
|
Line 702 schedAIOWrite(sched_root_task_t * __restrict root, sch
|
Line 706 schedAIOWrite(sched_root_task_t * __restrict root, sch
|
| |
|
| if (aio_write(acb)) { |
if (aio_write(acb)) { |
| LOGERR; |
LOGERR; |
| free(acb); | e_free(acb); |
| return NULL; |
return NULL; |
| } |
} |
| |
|
|
Line 801 schedLIORead(sched_root_task_t * __restrict root, sche
|
Line 805 schedLIORead(sched_root_task_t * __restrict root, sche
|
| } else |
} else |
| off = offset; |
off = offset; |
| |
|
| if (!(acb = calloc(sizeof(void*), nbufs))) { | if (!(acb = e_calloc(sizeof(void*), nbufs))) { |
| LOGERR; |
LOGERR; |
| return NULL; |
return NULL; |
| } else |
} else |
| memset(acb, 0, sizeof(void*) * nbufs); |
memset(acb, 0, sizeof(void*) * nbufs); |
| for (i = 0; i < nbufs; off += bufs[i++].iov_len) { |
for (i = 0; i < nbufs; off += bufs[i++].iov_len) { |
| acb[i] = malloc(sizeof(struct aiocb)); | acb[i] = e_malloc(sizeof(struct aiocb)); |
| if (!acb[i]) { |
if (!acb[i]) { |
| LOGERR; |
LOGERR; |
| for (i = 0; i < nbufs; i++) |
for (i = 0; i < nbufs; i++) |
| if (acb[i]) |
if (acb[i]) |
| free(acb[i]); | e_free(acb[i]); |
| free(acb); | e_free(acb); |
| return NULL; |
return NULL; |
| } else |
} else |
| memset(acb[i], 0, sizeof(struct aiocb)); |
memset(acb[i], 0, sizeof(struct aiocb)); |
|
Line 832 schedLIORead(sched_root_task_t * __restrict root, sche
|
Line 836 schedLIORead(sched_root_task_t * __restrict root, sche
|
| LOGERR; |
LOGERR; |
| for (i = 0; i < nbufs; i++) |
for (i = 0; i < nbufs; i++) |
| if (acb[i]) |
if (acb[i]) |
| free(acb[i]); | e_free(acb[i]); |
| free(acb); | e_free(acb); |
| return NULL; |
return NULL; |
| } |
} |
| |
|
|
Line 878 schedLIOWrite(sched_root_task_t * __restrict root, sch
|
Line 882 schedLIOWrite(sched_root_task_t * __restrict root, sch
|
| } else |
} else |
| off = offset; |
off = offset; |
| |
|
| if (!(acb = calloc(sizeof(void*), nbufs))) { | if (!(acb = e_calloc(sizeof(void*), nbufs))) { |
| LOGERR; |
LOGERR; |
| return NULL; |
return NULL; |
| } else |
} else |
| memset(acb, 0, sizeof(void*) * nbufs); |
memset(acb, 0, sizeof(void*) * nbufs); |
| for (i = 0; i < nbufs; off += bufs[i++].iov_len) { |
for (i = 0; i < nbufs; off += bufs[i++].iov_len) { |
| acb[i] = malloc(sizeof(struct aiocb)); | acb[i] = e_malloc(sizeof(struct aiocb)); |
| if (!acb[i]) { |
if (!acb[i]) { |
| LOGERR; |
LOGERR; |
| for (i = 0; i < nbufs; i++) |
for (i = 0; i < nbufs; i++) |
| if (acb[i]) |
if (acb[i]) |
| free(acb[i]); | e_free(acb[i]); |
| free(acb); | e_free(acb); |
| return NULL; |
return NULL; |
| } else |
} else |
| memset(acb[i], 0, sizeof(struct aiocb)); |
memset(acb[i], 0, sizeof(struct aiocb)); |
|
Line 909 schedLIOWrite(sched_root_task_t * __restrict root, sch
|
Line 913 schedLIOWrite(sched_root_task_t * __restrict root, sch
|
| LOGERR; |
LOGERR; |
| for (i = 0; i < nbufs; i++) |
for (i = 0; i < nbufs; i++) |
| if (acb[i]) |
if (acb[i]) |
| free(acb[i]); | e_free(acb[i]); |
| free(acb); | e_free(acb); |
| return NULL; |
return NULL; |
| } |
} |
| |
|