Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_mutex.c
Show First 20 Lines • Show All 889 Lines • ▼ Show 20 Lines | |||||
#ifdef HWPMC_HOOKS | #ifdef HWPMC_HOOKS | ||||
PMC_SOFT_CALL( , , lock, failed); | PMC_SOFT_CALL( , , lock, failed); | ||||
#endif | #endif | ||||
#ifdef LOCK_PROFILING | #ifdef LOCK_PROFILING | ||||
doing_lockprof = 1; | doing_lockprof = 1; | ||||
#elif defined(KDTRACE_HOOKS) | #elif defined(KDTRACE_HOOKS) | ||||
doing_lockprof = lockstat_enabled; | doing_lockprof = lockstat_enabled; | ||||
#endif | |||||
#ifdef KDTRACE_HOOKS | |||||
if (__predict_false(doing_lockprof)) | if (__predict_false(doing_lockprof)) | ||||
spin_time -= lockstat_nsecs(&td->td_lock->lock_object); | spin_time -= lockstat_nsecs(&td->td_lock->lock_object); | ||||
#endif | #endif | ||||
spinlock_enter(); | spinlock_enter(); | ||||
for (;;) { | for (;;) { | ||||
retry: | retry: | ||||
m = td->td_lock; | m = td->td_lock; | ||||
▲ Show 20 Lines • Show All 444 Lines • Show Last 20 Lines |