diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2001-12-14 08:35:13 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2001-12-14 08:35:13 +0000 |
commit | c22379bc91ec3e19a4d69b7edb4d305129f0fd15 (patch) | |
tree | 6f20db4b793ececc99d8600c9d50e624fbef21c6 /sys/arch/i386/include/intr.h | |
parent | 3e42b30e8ff0c526442c1a25ddf233d10e8976ac (diff) |
SMALL_KERNEL -> outline splx
Diffstat (limited to 'sys/arch/i386/include/intr.h')
-rw-r--r-- | sys/arch/i386/include/intr.h | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/sys/arch/i386/include/intr.h b/sys/arch/i386/include/intr.h index 5ebac3b71d1..3bd8226f64d 100644 --- a/sys/arch/i386/include/intr.h +++ b/sys/arch/i386/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.11 2001/12/13 23:38:27 niklas Exp $ */ +/* $OpenBSD: intr.h,v 1.12 2001/12/14 08:35:12 niklas Exp $ */ /* $NetBSD: intr.h,v 1.5 1996/05/13 06:11:28 mycroft Exp $ */ /* @@ -108,7 +108,7 @@ extern void Xspllower __P((void)); static __inline int splraise __P((int)); static __inline int spllower __P((int)); -static __inline void splx __P((int)); +#define SPLX_DECL void splx __P((int)); static __inline void softintr __P((int)); /* @@ -130,16 +130,30 @@ splraise(ncpl) * Restore an old interrupt priority level. If any thereby unmasked * interrupts are pending, call Xspllower() to process them. */ -static __inline void -splx(ncpl) - int ncpl; -{ - __asm __volatile(""); - cpl = ncpl; - if (ipending & IUNMASK(ncpl)) - Xspllower(); +#define SPLX_BODY \ +void \ +splx(ncpl) \ + int ncpl; \ +{ \ + __asm __volatile(""); \ + cpl = ncpl; \ + if (ipending & IUNMASK(ncpl)) \ + Xspllower(); \ } +/* If SMALL_KERNEL make splx out of line, otherwise inline it. */ +#ifdef SMALL_KERNEL +#define SPLX_INLINED_BODY +#define SPLX_OUTLINED_BODY SPLX_BODY +SPLX_DECL +#else +#define SPLX_INLINED_BODY static __inline SPLX_BODY +#define SPLX_OUTLINED_BODY +static __inline SPLX_DECL +#endif + +SPLX_INLINED_BODY + /* * Same as splx(), but we return the old value of spl, for the * benefit of some splsoftclock() callers. |