diff --git a/sys/kern/kern_condvar.c b/sys/kern/kern_condvar.c index 2731f581a29..e4bd1f926c0 100644 --- a/sys/kern/kern_condvar.c +++ b/sys/kern/kern_condvar.c @@ -37,13 +37,13 @@ #include #include #include +#include #include #include #include #include #include #ifdef KTRACE -#include #include #include #endif @@ -112,7 +112,7 @@ _cv_wait(struct cv *cvp, struct lock_object *lock) char wmesg[WMESGLEN + 1]; #endif struct lock_class *class; - struct thread *td; + struct thread *td __ktrace_used; uintptr_t lock_state; td = curthread; @@ -174,7 +174,7 @@ _cv_wait_unlock(struct cv *cvp, struct lock_object *lock) char wmesg[WMESGLEN + 1]; #endif struct lock_class *class; - struct thread *td; + struct thread *td __ktrace_used; td = curthread; CV_ASSERT(cvp, lock, td); @@ -232,7 +232,7 @@ _cv_wait_sig(struct cv *cvp, struct lock_object *lock) char wmesg[WMESGLEN + 1]; #endif struct lock_class *class; - struct thread *td; + struct thread *td __ktrace_used; uintptr_t lock_state; int rval; @@ -301,7 +301,7 @@ _cv_timedwait_sbt(struct cv *cvp, struct lock_object *lock, sbintime_t sbt, char wmesg[WMESGLEN + 1]; #endif struct lock_class *class; - struct thread *td; + struct thread *td __ktrace_used; int lock_state, rval; td = curthread; @@ -371,7 +371,7 @@ _cv_timedwait_sig_sbt(struct cv *cvp, struct lock_object *lock, char wmesg[WMESGLEN + 1]; #endif struct lock_class *class; - struct thread *td; + struct thread *td __ktrace_used; int lock_state, rval; td = curthread; diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 9f11e9b3ed0..2241162f33a 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -47,6 +47,7 @@ #include #include #include +#include #include #include #include @@ -62,7 +63,6 @@ #include #ifdef KTRACE #include -#include #endif #ifdef EPOCH_TRACE #include @@ -133,7 +133,7 @@ int _sleep(const void *ident, struct lock_object *lock, int priority, const char *wmesg, sbintime_t sbt, sbintime_t pr, int flags) { - struct thread *td; + struct thread *td __ktrace_used; struct lock_class *class; uintptr_t lock_state; int catch, pri, rval, sleepq_flags; @@ -240,7 +240,7 @@ int msleep_spin_sbt(const void *ident, struct mtx *mtx, const char *wmesg, sbintime_t sbt, sbintime_t pr, int flags) { - struct thread *td; + struct thread *td __ktrace_used; int rval; WITNESS_SAVE_DECL(mtx);