diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-05-19 15:47:19 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-05-19 15:47:19 +0000 |
commit | 912729879adc44cafe45c930dcbb3a9ffb07ea0e (patch) | |
tree | 3d7c5b8346eda80ec16a5da0730dbc7a4e797d06 /sys/arch/armish | |
parent | 8147b2a17ca7e17fc4ab11db63dabb77b937d360 (diff) |
Implement splassert for armish and zaurus.
Diffstat (limited to 'sys/arch/armish')
-rw-r--r-- | sys/arch/armish/include/armish_intr.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sys/arch/armish/include/armish_intr.h b/sys/arch/armish/include/armish_intr.h index 2bc4f4da2a8..62477bdaf18 100644 --- a/sys/arch/armish/include/armish_intr.h +++ b/sys/arch/armish/include/armish_intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: armish_intr.h,v 1.3 2007/05/15 05:26:44 miod Exp $ */ +/* $OpenBSD: armish_intr.h,v 1.4 2007/05/19 15:47:18 miod Exp $ */ /* $NetBSD: i80321_intr.h,v 1.4 2003/07/05 06:53:08 dogcow Exp $ */ /* @@ -95,7 +95,22 @@ void *i80321_intr_establish(int irqno, int level, int (*func)(void *), void i80321_intr_disestablish(void *cookie); const char *i80321_intr_string(void *cookie); -#define splassert(wantipl) do { /* nada */ } while (0) +#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 i80321_splassert_check(int, const char *); +#define splassert(__wantipl) do { \ + if (splassert_ctl > 0) { \ + i80321_splassert_check(__wantipl, __func__); \ + } \ +} while (0) +#else +#define splassert(wantipl) do { /* nothing */ } while (0) +#endif #endif /* ! _LOCORE */ |