diff options
author | 2017-10-30 14:01:42 +0000 | |
---|---|---|
committer | 2017-10-30 14:01:42 +0000 | |
commit | bd1acdab0916af05a05c148af6080073686e58c5 (patch) | |
tree | d3e20b30dea0af3bc69054a09e906756496582ce /sys/kern/kern_task.c | |
parent | Document {mtx,rw,rrw}_init_flags() and MUTEX_INITIALIZER_FLAGS(). (diff) | |
download | wireguard-openbsd-bd1acdab0916af05a05c148af6080073686e58c5.tar.xz wireguard-openbsd-bd1acdab0916af05a05c148af6080073686e58c5.zip |
Let witness(4) differentiate between taskq mutexes to avoid
reporting an error in a scenario like the following:
1. mtx_enter(&tqa->tq_mtx);
2. IRQ
3. mtx_enter(&tqb->tq_mtx);
Found by Hrvoje Popovski, OK mpi@
Diffstat (limited to 'sys/kern/kern_task.c')
-rw-r--r-- | sys/kern/kern_task.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_task.c b/sys/kern/kern_task.c index f6dded07b89..cd7e2a436f4 100644 --- a/sys/kern/kern_task.c +++ b/sys/kern/kern_task.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_task.c,v 1.19 2017/02/14 10:31:15 mpi Exp $ */ +/* $OpenBSD: kern_task.c,v 1.20 2017/10/30 14:01:42 visa Exp $ */ /* * Copyright (c) 2013 David Gwynne <dlg@openbsd.org> @@ -96,7 +96,7 @@ taskq_create(const char *name, unsigned int nthreads, int ipl, tq->tq_name = name; tq->tq_flags = flags; - mtx_init(&tq->tq_mtx, ipl); + mtx_init_flags(&tq->tq_mtx, ipl, name, 0); TAILQ_INIT(&tq->tq_worklist); /* try to create a thread to guarantee that tasks will be serviced */ |