summaryrefslogtreecommitdiff
path: root/sys/kern/subr_xxx.c
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2019-05-17 03:53:09 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2019-05-17 03:53:09 +0000
commitb2ed2ef300bb0d91608b12afd90409a635474b51 (patch)
treec213e7aff981217963d4cf521b3e35866c9b48f0 /sys/kern/subr_xxx.c
parentca12f02bc5db7384cbdf36cbc74511ea7e21ae64 (diff)
Add SMR_ASSERT_NONCRITICAL() in assertwaitok(). This eases debugging
because now the error is detected before context switch. The sleep code path eventually calls assertwaitok() in mi_switch(), so the assertwaitok() in the SMR barrier function is somewhat redundant and can be removed. OK mpi@
Diffstat (limited to 'sys/kern/subr_xxx.c')
-rw-r--r--sys/kern/subr_xxx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/subr_xxx.c b/sys/kern/subr_xxx.c
index 0ecc0b060f2..5b63564e1a0 100644
--- a/sys/kern/subr_xxx.c
+++ b/sys/kern/subr_xxx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_xxx.c,v 1.16 2018/04/03 08:58:05 mpi Exp $ */
+/* $OpenBSD: subr_xxx.c,v 1.17 2019/05/17 03:53:08 visa Exp $ */
/* $NetBSD: subr_xxx.c,v 1.10 1996/02/04 02:16:51 christos Exp $ */
/*
@@ -39,6 +39,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
+#include <sys/smr.h>
/*
@@ -159,6 +160,7 @@ assertwaitok(void)
return;
splassert(IPL_NONE);
+ SMR_ASSERT_NONCRITICAL();
#ifdef DIAGNOSTIC
if (curcpu()->ci_mutex_level != 0)
panic("assertwaitok: non-zero mutex count: %d",