diff options
author | 2016-08-11 01:32:31 +0000 | |
---|---|---|
committer | 2016-08-11 01:32:31 +0000 | |
commit | 9e51102cd66f9021d9708400f50fd0a5ffe9e57e (patch) | |
tree | 0b2b8dd095a60941b799c79a497bda5ec2d15abb /sys/kern/kern_task.c | |
parent | replace abuse of the static map entries RB_ENTRY pointers with an SLIST (diff) | |
download | wireguard-openbsd-9e51102cd66f9021d9708400f50fd0a5ffe9e57e.tar.xz wireguard-openbsd-9e51102cd66f9021d9708400f50fd0a5ffe9e57e.zip |
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.c | 8 |
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); |