summaryrefslogtreecommitdiff
path: root/sys/arch/mvme88k/include/intr.h
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-01-03 23:17:44 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-01-03 23:17:44 +0000
commitb6a1327f1d717f24a2d40276ce6cbed212c26727 (patch)
treec9a1dc3d3bbd3bf52d3824313cced4d3c717ab60 /sys/arch/mvme88k/include/intr.h
parent6f928825c53c4dfb81be0ae0add805858e1d8b96 (diff)
splassert support for m88k
Diffstat (limited to 'sys/arch/mvme88k/include/intr.h')
-rw-r--r--sys/arch/mvme88k/include/intr.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/sys/arch/mvme88k/include/intr.h b/sys/arch/mvme88k/include/intr.h
index 8b520af881e..28c7f9379ed 100644
--- a/sys/arch/mvme88k/include/intr.h
+++ b/sys/arch/mvme88k/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.9 2002/04/29 07:35:20 miod Exp $ */
+/* $OpenBSD: intr.h,v 1.10 2003/01/03 23:17:42 miod Exp $ */
/*
* Copyright (C) 2000 Steve Murphree, Jr.
* All rights reserved.
@@ -92,7 +92,22 @@ int spl0(void);
/* needs major cleanup - XXX nivas */
/* SPL asserts */
-#define splassert(wantipl) /* nothing */
+#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 (__predict_false(splassert_ctl > 0)) { \
+ splassert_check(__wantipl, __func__); \
+ } \
+} while (0)
+#else
+#define splassert(wantipl) do { /* nothing */ } while (0)
+#endif
#if 0
spl0 is a function by itself. I really am serious about the clean up