summaryrefslogtreecommitdiff
path: root/sys/arch/hp300/include
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1997-02-04 06:21:34 +0000
committerJason Downs <downsj@cvs.openbsd.org>1997-02-04 06:21:34 +0000
commitffccb3a8f483a4b0442123bab1d15ff22827899b (patch)
tree0a9f27b69c7bc10fea4669ee74ef15042387fa8b /sys/arch/hp300/include
parent4033520eec6ef0571bc70ae9c27fbdc83b02a9f9 (diff)
checkpoint: pull in spl() changes from NetBSD, and more siginfo.
Diffstat (limited to 'sys/arch/hp300/include')
-rw-r--r--sys/arch/hp300/include/param.h27
1 files changed, 21 insertions, 6 deletions
diff --git a/sys/arch/hp300/include/param.h b/sys/arch/hp300/include/param.h
index d6f4b852f76..a5c8ef1fe01 100644
--- a/sys/arch/hp300/include/param.h
+++ b/sys/arch/hp300/include/param.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: param.h,v 1.5 1997/01/12 15:13:38 downsj Exp $ */
-/* $NetBSD: param.h,v 1.27 1996/12/09 03:04:48 thorpej Exp $ */
+/* $OpenBSD: param.h,v 1.6 1997/02/04 06:21:33 downsj Exp $ */
+/* $NetBSD: param.h,v 1.28 1997/02/02 09:34:26 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -155,6 +155,16 @@
_spl_r; \
})
+#define _splraise(s) \
+({ \
+ register int _spl_r; \
+\
+ __asm __volatile ("clrl %0; movew sr,%0;" : "&=d" (_spl_r) : ); \
+ if ((_spl_r & PSL_IPL) < ((s) & PSL_IPL)) \
+ __asm __volatile ("movew %0,sr;" : : "di" (s)); \
+ _spl_r; \
+})
+
/* spl0 requires checking for software interrupts */
#define spl1() _spl(PSL_S|PSL_IPL1)
#define spl2() _spl(PSL_S|PSL_IPL2)
@@ -175,12 +185,17 @@ extern unsigned short hp300_ttyipl;
extern unsigned short hp300_impipl;
#endif /* _KERNEL && !_LOCORE */
+/* These spl calls are _not_ to be used by machine-independent code. */
+#define splhil() _splraise(PSL_S|PSL_IPL1)
+#define splkbd() splhil()
+
+/* These spl calls are used by machine-independent code. */
#define splsoftclock() spl1()
#define splsoftnet() spl1()
-#define splbio() _spl(hp300_bioipl)
-#define splnet() _spl(hp300_netipl)
-#define spltty() _spl(hp300_ttyipl)
-#define splimp() _spl(hp300_impipl)
+#define splbio() _splraise(hp300_bioipl)
+#define splnet() _splraise(hp300_netipl)
+#define spltty() _splraise(hp300_ttyipl)
+#define splimp() _splraise(hp300_impipl)
#define splclock() spl6()
#define splstatclock() spl6()
#define splvm() spl6()