diff options
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 5 | ||||
-rw-r--r-- | sys/arch/i386/include/intr.h | 34 |
2 files changed, 28 insertions, 11 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 9d64564f33b..5686edeb4b4 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.189 2001/12/08 02:24:06 art Exp $ */ +/* $OpenBSD: machdep.c,v 1.190 2001/12/14 08:35:12 niklas Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -3329,3 +3329,6 @@ _bus_dmamem_alloc_range(t, size, alignment, boundary, segs, nsegs, rsegs, return (0); } + +/* If SMALL_KERNEL this results in an out of line definition of splx. */ +SPLX_OUTLINED_BODY 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. |