diff options
author | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2023-02-15 20:43:42 +0000 |
---|---|---|
committer | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2023-02-15 20:43:42 +0000 |
commit | e878437e3a1e4b76915e0d618f0044b2eb28bf6a (patch) | |
tree | 0d2082d12964a01deea14d6dfd4b4370339abc9c /sys/kern | |
parent | bf29ce86459b6b1c3fbf9b048eebcb7bea4207dc (diff) |
Relax kernel lock assertion within tsleep(9). The `nowake' channel is
the special case which doesn't expect wakeup(9), so allow to use it
without kernel lock held.
Discussed with and ok by claudio@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_synch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index e2c6f2247ac..fd97013cb26 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_synch.c,v 1.190 2022/08/14 01:58:27 jsg Exp $ */ +/* $OpenBSD: kern_synch.c,v 1.191 2023/02/15 20:43:41 mvs Exp $ */ /* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */ /* @@ -124,7 +124,7 @@ tsleep(const volatile void *ident, int priority, const char *wmesg, int timo) KASSERT(ident != &nowake || ISSET(priority, PCATCH) || timo != 0); #ifdef MULTIPROCESSOR - KASSERT(timo || _kernel_lock_held()); + KASSERT(ident == &nowake || timo || _kernel_lock_held()); #endif #ifdef DDB |