summaryrefslogtreecommitdiff
path: root/sys/kern/kern_task.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2016-08-11 01:32:32 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2016-08-11 01:32:32 +0000
commit0b92141c62cb35c3cd0156f06c3326740c006a41 (patch)
tree08d4e397bd349f917974e36227864775c00689d6 /sys/kern/kern_task.c
parentcfaa9b58f5d7101d7ba8a7aa453f04b56c2c740e (diff)
shuffle some code to make it more symmetrical.
no functional change.
Diffstat (limited to 'sys/kern/kern_task.c')
-rw-r--r--sys/kern/kern_task.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_task.c b/sys/kern/kern_task.c
index 6a888be6cb3..7b0af79b6a5 100644
--- a/sys/kern/kern_task.c
+++ b/sys/kern/kern_task.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_task.c,v 1.17 2015/12/08 11:48:54 dlg Exp $ */
+/* $OpenBSD: kern_task.c,v 1.18 2016/08/11 01:32:31 dlg Exp $ */
/*
* Copyright (c) 2013 David Gwynne <dlg@openbsd.org>
@@ -295,12 +295,12 @@ taskq_thread(void *xtq)
last = (--tq->tq_running == 0);
mtx_leave(&tq->tq_mtx);
- if (ISSET(tq->tq_flags, TASKQ_MPSAFE))
- KERNEL_LOCK();
-
if (ISSET(tq->tq_flags, TASKQ_CANTSLEEP))
atomic_clearbits_int(&curproc->p_flag, P_CANTSLEEP);
+ if (ISSET(tq->tq_flags, TASKQ_MPSAFE))
+ KERNEL_LOCK();
+
if (last)
wakeup_one(&tq->tq_running);