mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
_taskqueue_start_threads() now fails if it doesn't actually start any threads.
Reviewed by: jhb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D7701
This commit is contained in:
parent
ff9b61ca07
commit
da2ded6575
1 changed files with 5 additions and 0 deletions
|
|
@ -625,6 +625,11 @@ _taskqueue_start_threads(struct taskqueue **tqp, int count, int pri,
|
|||
} else
|
||||
tq->tq_tcount++;
|
||||
}
|
||||
if (tq->tq_tcount == 0) {
|
||||
free(tq->tq_threads, M_TASKQUEUE);
|
||||
tq->tq_threads = NULL;
|
||||
return (ENOMEM);
|
||||
}
|
||||
for (i = 0; i < count; i++) {
|
||||
if (tq->tq_threads[i] == NULL)
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in a new issue