Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/subr_taskqueue.c
Show First 20 Lines • Show All 619 Lines • ▼ Show 20 Lines | for (i = 0; i < count; i++) { | ||||
if (error) { | if (error) { | ||||
/* should be ok to continue, taskqueue_free will dtrt */ | /* should be ok to continue, taskqueue_free will dtrt */ | ||||
printf("%s: kthread_add(%s): error %d", __func__, | printf("%s: kthread_add(%s): error %d", __func__, | ||||
ktname, error); | ktname, error); | ||||
tq->tq_threads[i] = NULL; /* paranoid */ | tq->tq_threads[i] = NULL; /* paranoid */ | ||||
} else | } else | ||||
tq->tq_tcount++; | 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++) { | for (i = 0; i < count; i++) { | ||||
if (tq->tq_threads[i] == NULL) | if (tq->tq_threads[i] == NULL) | ||||
continue; | continue; | ||||
td = tq->tq_threads[i]; | td = tq->tq_threads[i]; | ||||
if (mask) { | if (mask) { | ||||
error = cpuset_setthread(td->td_tid, mask); | error = cpuset_setthread(td->td_tid, mask); | ||||
/* | /* | ||||
* Failing to pin is rarely an actual fatal error; | * Failing to pin is rarely an actual fatal error; | ||||
▲ Show 20 Lines • Show All 157 Lines • Show Last 20 Lines |