diff options
author | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2022-08-15 09:10:37 +0000 |
---|---|---|
committer | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2022-08-15 09:10:37 +0000 |
commit | bed5aa484111700bcd37270ca0f0a38ace80e8a0 (patch) | |
tree | 983a59c29903fd02fc8e374501831119b8a5738d | |
parent | 933b0acc5a7ac0962558eca0725d8ce0ebeb0032 (diff) |
Stop doing lockless `t_flags' check within task_add(9) and task_del(9).
This doesn't work on MP systems. We do locked `t_flags' check just after
lockless check, so just remove it.
ok dlg@
-rw-r--r-- | sys/kern/kern_task.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/kern/kern_task.c b/sys/kern/kern_task.c index 1a5ed9c5014..2a2fa256d42 100644 --- a/sys/kern/kern_task.c +++ b/sys/kern/kern_task.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_task.c,v 1.31 2020/08/01 08:40:20 anton Exp $ */ +/* $OpenBSD: kern_task.c,v 1.32 2022/08/15 09:10:36 mvs Exp $ */ /* * Copyright (c) 2013 David Gwynne <dlg@openbsd.org> @@ -354,9 +354,6 @@ task_add(struct taskq *tq, struct task *w) { 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; @@ -379,9 +376,6 @@ task_del(struct taskq *tq, struct task *w) { 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; |