summaryrefslogtreecommitdiffstats
path: root/sys/arch/sgi/include/intr.h
diff options
context:
space:
mode:
authorvisa <visa@openbsd.org>2019-09-05 05:31:38 +0000
committervisa <visa@openbsd.org>2019-09-05 05:31:38 +0000
commitc992d008a2a019c41cdbaf3d0bc25b11c7416233 (patch)
tree87d711cc446c3aac7973cd13874aaaeda1becd69 /sys/arch/sgi/include/intr.h
parentAdjust interrupt priority levels on mips64 so that priorities (diff)
downloadwireguard-openbsd-c992d008a2a019c41cdbaf3d0bc25b11c7416233.tar.xz
wireguard-openbsd-c992d008a2a019c41cdbaf3d0bc25b11c7416233.zip
Implement splassert() on mips64.
Diffstat (limited to 'sys/arch/sgi/include/intr.h')
-rw-r--r--sys/arch/sgi/include/intr.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/sys/arch/sgi/include/intr.h b/sys/arch/sgi/include/intr.h
index 67246316b15..cbd905b8fcc 100644
--- a/sys/arch/sgi/include/intr.h
+++ b/sys/arch/sgi/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.52 2019/09/05 05:06:33 visa Exp $ */
+/* $OpenBSD: intr.h,v 1.53 2019/09/05 05:31:38 visa Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -127,8 +127,24 @@ void softintr_schedule(void *);
void splinit(void);
+#ifdef DIAGNOSTIC
+/*
+ * Although this function is implemented in MI code, it must be in this MD
+ * header because we don't want this header to include MI includes.
+ */
+void splassert_fail(int, int, const char *);
+extern int splassert_ctl;
+void splassert_check(int, const char *);
+#define splassert(__wantipl) do { \
+ if (splassert_ctl > 0) { \
+ splassert_check(__wantipl, __func__); \
+ } \
+} while (0)
+#define splsoftassert(wantipl) splassert(wantipl)
+#else
#define splassert(X)
#define splsoftassert(X)
+#endif
void register_splx_handler(void (*)(int));
int splraise(int);