From: dlg Date: Thu, 11 Aug 2016 01:32:31 +0000 (+0000) Subject: shuffle some code to make it more symmetrical. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9e51102cd66f9021d9708400f50fd0a5ffe9e57e;p=openbsd shuffle some code to make it more symmetrical. no functional change. --- 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 @@ -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);