diff options
author | jhb <jhb@FreeBSD.org> | 2005-02-28 19:26:16 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-02-28 19:26:16 +0000 |
commit | 2a1aef8db38147a03dd3a8c47b7461e61442ebaa (patch) | |
tree | 8abb5ad8487aeb2d7b636f7669813454d31dd126 | |
parent | 68dc8e15d8da1a3134cc8c737dbee75e449206e9 (diff) | |
download | FreeBSD-src-2a1aef8db38147a03dd3a8c47b7461e61442ebaa.zip FreeBSD-src-2a1aef8db38147a03dd3a8c47b7461e61442ebaa.tar.gz |
Define the _mtx_assert() function prototype as well as the MA_* constants
if either INVARIANTS or INVARIANT_SUPPORT is defined so that kernel modules
that want to use mtx_assert() only need to define INVARIANTS.
MFC after: 1 week
-rw-r--r-- | sys/sys/mutex.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h index 50c9617..8010ebb 100644 --- a/sys/sys/mutex.h +++ b/sys/sys/mutex.h @@ -115,7 +115,7 @@ void _mtx_lock_spin_flags(struct mtx *m, int opts, const char *file, int line); void _mtx_unlock_spin_flags(struct mtx *m, int opts, const char *file, int line); -#ifdef INVARIANT_SUPPORT +#if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) void _mtx_assert(struct mtx *m, int what, const char *file, int line); #endif @@ -424,12 +424,12 @@ struct mtx_args { * support as _mtx_assert() itself uses them and the latter implies that * _mtx_assert() must build. */ -#ifdef INVARIANT_SUPPORT +#if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) #define MA_OWNED 0x01 #define MA_NOTOWNED 0x02 #define MA_RECURSED 0x04 #define MA_NOTRECURSED 0x08 -#endif /* INVARIANT_SUPPORT */ +#endif #ifdef INVARIANTS #define mtx_assert(m, what) \ |