version 1.26.2.1, 2015/07/02 22:43:30
|
version 1.28.14.1, 2022/10/03 22:16:36
|
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 - 2015 | 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 215 schedInit(void ** __restrict data, size_t datlen)
|
Line 215 schedInit(void ** __restrict data, size_t datlen)
|
register int i; |
register int i; |
#endif |
#endif |
|
|
root = malloc(sizeof(sched_root_task_t)); | root = e_malloc(sizeof(sched_root_task_t)); |
if (!root) { |
if (!root) { |
LOGERR; |
LOGERR; |
} else { |
} else { |
Line 233 schedInit(void ** __restrict data, size_t datlen)
|
Line 233 schedInit(void ** __restrict data, size_t datlen)
|
LOGERR; |
LOGERR; |
while (i) |
while (i) |
pthread_mutex_destroy(&root->root_mtx[--i]); |
pthread_mutex_destroy(&root->root_mtx[--i]); |
free(root); | e_free(root); |
return NULL; |
return NULL; |
} |
} |
|
|
Line 373 schedEnd(sched_root_task_t ** __restrict root)
|
Line 373 schedEnd(sched_root_task_t ** __restrict root)
|
SCHED_QLOCK((*root), taskUNUSE); |
SCHED_QLOCK((*root), taskUNUSE); |
TAILQ_FOREACH_SAFE(task, &(*root)->root_unuse, task_node, tmp) { |
TAILQ_FOREACH_SAFE(task, &(*root)->root_unuse, task_node, tmp) { |
TAILQ_REMOVE(&(*root)->root_unuse, task, task_node); |
TAILQ_REMOVE(&(*root)->root_unuse, task, task_node); |
free(task); | e_free(task); |
} |
} |
SCHED_QUNLOCK((*root), taskUNUSE); |
SCHED_QUNLOCK((*root), taskUNUSE); |
|
|
Line 382 schedEnd(sched_root_task_t ** __restrict root)
|
Line 382 schedEnd(sched_root_task_t ** __restrict root)
|
|
|
#ifdef HAVE_LIBPTHREAD |
#ifdef HAVE_LIBPTHREAD |
for (i = 0; i < taskMAX; i++) { |
for (i = 0; i < taskMAX; i++) { |
|
SCHED_QTRYLOCK(*root, i); |
SCHED_QUNLOCK(*root, i); |
SCHED_QUNLOCK(*root, i); |
pthread_mutex_destroy(&(*root)->root_mtx[i]); |
pthread_mutex_destroy(&(*root)->root_mtx[i]); |
} |
} |
#endif |
#endif |
|
|
free(*root); | e_free(*root); |
*root = NULL; |
*root = NULL; |
return 0; |
return 0; |
} |
} |