Fix INVARIANT_SUPPORT-only builds (without INVARIANTS). The required
`infrastructure' built with INVARIANT_SUPPORT for kern_mutex.c essentially involves _mtx_assert(), which makes use of constants that were defined under #ifdef INVARIANTS here.
This commit is contained in:
parent
a3c4c7524d
commit
73d318e7f2
@ -393,14 +393,21 @@ do { \
|
||||
|
||||
/*
|
||||
* The INVARIANTS-enabled mtx_assert() functionality.
|
||||
*
|
||||
* The constants need to be defined for INVARIANT_SUPPORT infrastructure
|
||||
* support as _mtx_assert() itself uses them and the latter implies that
|
||||
* _mtx_assert() must build.
|
||||
*/
|
||||
#ifdef INVARIANTS
|
||||
#ifdef INVARIANT_SUPPORT
|
||||
#define MA_OWNED 0x01
|
||||
#define MA_NOTOWNED 0x02
|
||||
#define MA_RECURSED 0x04
|
||||
#define MA_NOTRECURSED 0x08
|
||||
|
||||
void _mtx_assert(struct mtx *m, int what, const char *file, int line);
|
||||
#endif /* INVARIANT_SUPPORT */
|
||||
|
||||
#ifdef INVARIANTS
|
||||
#define mtx_assert(m, what) \
|
||||
_mtx_assert((m), (what), __FILE__, __LINE__)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user