locks: fix compilation issues without SMP or KDTRACE_HOOKS
This commit is contained in:
parent
00464bff96
commit
3fb5232780
@ -462,9 +462,7 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v)
|
||||
struct mtx *m;
|
||||
struct turnstile *ts;
|
||||
uintptr_t tid;
|
||||
#ifdef ADAPTIVE_MUTEXES
|
||||
struct thread *owner;
|
||||
#endif
|
||||
#ifdef KTR
|
||||
int cont_logged = 0;
|
||||
#endif
|
||||
@ -628,6 +626,9 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v)
|
||||
*/
|
||||
#ifdef KDTRACE_HOOKS
|
||||
sleep_time -= lockstat_nsecs(&m->lock_object);
|
||||
#endif
|
||||
#ifndef ADAPTIVE_MUTEXES
|
||||
owner = mtx_owner(m);
|
||||
#endif
|
||||
MPASS(owner == mtx_owner(m));
|
||||
turnstile_wait(ts, owner, TS_EXCLUSIVE_QUEUE);
|
||||
|
@ -520,8 +520,8 @@ _sx_xlock_hard(struct sx *sx, uintptr_t x, uintptr_t tid, int opts,
|
||||
#endif
|
||||
#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING)
|
||||
uintptr_t state;
|
||||
int extra_work;
|
||||
#endif
|
||||
int extra_work = 0;
|
||||
|
||||
if (SCHEDULER_STOPPED())
|
||||
return (0);
|
||||
@ -880,8 +880,8 @@ _sx_slock_hard(struct sx *sx, int opts, const char *file, int line, uintptr_t x)
|
||||
#endif
|
||||
#if defined(KDTRACE_HOOKS) || defined(LOCK_PROFILING)
|
||||
uintptr_t state;
|
||||
int extra_work;
|
||||
#endif
|
||||
int extra_work = 0;
|
||||
|
||||
if (SCHEDULER_STOPPED())
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user