diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index bc335c558a5f..e66e6f8e36fd 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -53,6 +53,12 @@ #include "opt_ddb.h" #include "opt_witness.h" +/* + * Cause non-inlined mtx_*() to be compiled. + * Must be defined early because other system headers may include mutex.h. + */ +#define _KERN_MUTEX_C_ + #include #include #include @@ -73,7 +79,6 @@ #include #include -#define _KERN_MUTEX_C_ /* Cause non-inlined mtx_*() to be compiled. */ #include /* diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index bc335c558a5f..e66e6f8e36fd 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.c @@ -53,6 +53,12 @@ #include "opt_ddb.h" #include "opt_witness.h" +/* + * Cause non-inlined mtx_*() to be compiled. + * Must be defined early because other system headers may include mutex.h. + */ +#define _KERN_MUTEX_C_ + #include #include #include @@ -73,7 +79,6 @@ #include #include -#define _KERN_MUTEX_C_ /* Cause non-inlined mtx_*() to be compiled. */ #include /* diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index bc335c558a5f..e66e6f8e36fd 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -53,6 +53,12 @@ #include "opt_ddb.h" #include "opt_witness.h" +/* + * Cause non-inlined mtx_*() to be compiled. + * Must be defined early because other system headers may include mutex.h. + */ +#define _KERN_MUTEX_C_ + #include #include #include @@ -73,7 +79,6 @@ #include #include -#define _KERN_MUTEX_C_ /* Cause non-inlined mtx_*() to be compiled. */ #include /*