1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

Fix is_splxxx() warnings when not compiled with INVARIANT_SUPPORT.

Approved by:	jkh
This commit is contained in:
Peter Wemm 2000-02-14 06:11:53 +00:00
parent 194a0b6c97
commit e463cfe7b6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57200

View File

@ -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 */