-/* $OpenBSD: kern_task.c,v 1.32 2022/08/15 09:10:36 mvs Exp $ */
+/* $OpenBSD: kern_task.c,v 1.33 2022/08/15 11:38:35 mvs Exp $ */
/*
* Copyright (c) 2013 David Gwynne <dlg@openbsd.org>
{
int rv = 0;
+ if (ISSET(w->t_flags, TASK_ONQUEUE))
+ return (0);
+
mtx_enter(&tq->tq_mtx);
if (!ISSET(w->t_flags, TASK_ONQUEUE)) {
rv = 1;
{
int rv = 0;
+ if (!ISSET(w->t_flags, TASK_ONQUEUE))
+ return (0);
+
mtx_enter(&tq->tq_mtx);
if (ISSET(w->t_flags, TASK_ONQUEUE)) {
rv = 1;