summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2004-05-07 20:33:05 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2004-05-07 20:33:05 +0000
commitb536d5a5ba7999a87374cc537daa303e3df61644 (patch)
treedddb76ce669c4f60c0dc4ee3c2d1e15853d155c3 /sys/arch
parentc5a97d51f4afd7fb48642365a378ee96aa41db33 (diff)
spllower should return the previous level, to match other archs.
"looks right" miod
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/amd64/include/intr.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/arch/amd64/include/intr.h b/sys/arch/amd64/include/intr.h
index 1b3390d7b17..a9ba202472f 100644
--- a/sys/arch/amd64/include/intr.h
+++ b/sys/arch/amd64/include/intr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: intr.h,v 1.1 2004/01/28 01:39:39 mickey Exp $ */
+/* $OpenBSD: intr.h,v 1.2 2004/05/07 20:33:04 tedu Exp $ */
/* $NetBSD: intr.h,v 1.2 2003/05/04 22:01:56 fvdl Exp $ */
/*-
@@ -113,7 +113,7 @@ struct intrhand {
extern void Xspllower(int);
static __inline int splraise(int);
-static __inline void spllower(int);
+static __inline int spllower(int);
static __inline void softintr(int);
/*
@@ -151,9 +151,10 @@ splraise(int nlevel)
* Restore a value to cpl (unmasking interrupts). If any unmasked
* interrupts are pending, call Xspllower() to process them.
*/
-static __inline void
+static __inline int
spllower(int nlevel)
{
+ int olevel;
struct cpu_info *ci = curcpu();
__splbarrier();
@@ -162,10 +163,12 @@ spllower(int nlevel)
* the XOR below should only show interrupts that
* are being unmasked.
*/
+ olevel = ci->ci_ilevel;
if (ci->ci_ipending & IUNMASK(ci,nlevel))
Xspllower(nlevel);
else
ci->ci_ilevel = nlevel;
+ return (olevel);
}
/*