From b536d5a5ba7999a87374cc537daa303e3df61644 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Fri, 7 May 2004 20:33:05 +0000 Subject: spllower should return the previous level, to match other archs. "looks right" miod --- sys/arch/amd64/include/intr.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sys/arch') 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); } /* -- cgit v1.2.3