diff options
author | peter <peter@FreeBSD.org> | 2000-02-14 06:11:53 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2000-02-14 06:11:53 +0000 |
commit | 963a1b6c306c06b16a4067e1247164572821a16d (patch) | |
tree | 6c32d52f4fbd9c676a1ff46a0722bf688d1de34e /sys/i386 | |
parent | 89739dfdaa94296468383ea05fac006c6aa306c4 (diff) | |
download | FreeBSD-src-963a1b6c306c06b16a4067e1247164572821a16d.zip FreeBSD-src-963a1b6c306c06b16a4067e1247164572821a16d.tar.gz |
Fix is_splxxx() warnings when not compiled with INVARIANT_SUPPORT.
Approved by: jkh
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/isa/ipl_funcs.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/sys/i386/isa/ipl_funcs.c b/sys/i386/isa/ipl_funcs.c index 5a305ec..14d74c9 100644 --- a/sys/i386/isa/ipl_funcs.c +++ b/sys/i386/isa/ipl_funcs.c @@ -65,6 +65,17 @@ softclockpending(void) return (ipending & SWI_CLOCK_PENDING); } +#ifdef INVARIANT_SUPPORT +#define GENSPLASSERT(NAME, MODIFIER) \ +int \ +is_##NAME(void) \ +{ \ + return ((cpl & (MODIFIER)) == (MODIFIER)); \ +} +#else +#define GENSPLASSERT(NAME, MODIFIER) +#endif + #ifndef SMP #define GENSPL(NAME, OP, MODIFIER, PC) \ @@ -76,11 +87,7 @@ unsigned NAME(void) \ cpl OP MODIFIER; \ return (x); \ } \ -int \ -is_##NAME(void) \ -{ \ - return ((cpl & (MODIFIER)) == (MODIFIER)); \ -} +GENSPLASSERT(NAME, MODIFIER) void spl0(void) @@ -192,11 +199,7 @@ unsigned NAME(void) \ \ return (x); \ } \ -int \ -is_##NAME(void) \ -{ \ - return ((cpl & (MODIFIER)) == (MODIFIER)); \ -} +GENSPLASSERT(NAME, MODIFIER) #else /* INTR_SPL */ @@ -213,12 +216,7 @@ unsigned NAME(void) \ \ return (x); \ } \ -int \ -is_##NAME(void) \ -{ \ - return ((cpl & (MODIFIER)) == (MODIFIER)); \ -} - +GENSPLASSERT(NAME, MODIFIER) #endif /* INTR_SPL */ |