If the workqueue is using a prio less than PRI_KERNEL, make sure KTHREAD_TS
is used when creating the kthread.
This commit is contained in:
parent
aea18867f7
commit
320d4922ba
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: subr_workqueue.c,v 1.32 2011/10/23 21:41:23 jym Exp $ */
|
||||
/* $NetBSD: subr_workqueue.c,v 1.33 2012/10/07 22:16:21 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c)2002, 2005, 2006, 2007 YAMAMOTO Takashi,
|
||||
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: subr_workqueue.c,v 1.32 2011/10/23 21:41:23 jym Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: subr_workqueue.c,v 1.33 2012/10/07 22:16:21 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/cpu.h>
|
||||
|
@ -161,6 +161,8 @@ workqueue_initqueue(struct workqueue *wq, struct workqueue_queue *q,
|
|||
cv_init(&q->q_cv, wq->wq_name);
|
||||
SIMPLEQ_INIT(&q->q_queue);
|
||||
ktf = ((wq->wq_flags & WQ_MPSAFE) != 0 ? KTHREAD_MPSAFE : 0);
|
||||
if (wq->wq_prio < PRI_KERNEL)
|
||||
ktf |= KTHREAD_TS;
|
||||
if (ci) {
|
||||
error = kthread_create(wq->wq_prio, ktf, ci, workqueue_worker,
|
||||
wq, &q->q_worker, "%s/%u", wq->wq_name, ci->ci_index);
|
||||
|
|
Loading…
Reference in New Issue