svn commit: r303655 - head/sys/kern
Mateusz Guzik
mjg at FreeBSD.org
Tue Aug 2 03:06:00 UTC 2016
Author: mjg
Date: Tue Aug 2 03:05:59 2016
New Revision: 303655
URL: https://svnweb.freebsd.org/changeset/base/303655
Log:
locks: fix compilation for KDTRACE_HOOKS && !ADAPTIVE_* case
Reported by: Michael Butler <imb protected-networks.net>
Modified:
head/sys/kern/kern_mutex.c
head/sys/kern/kern_rwlock.c
head/sys/kern/kern_sx.c
Modified: head/sys/kern/kern_mutex.c
==============================================================================
--- head/sys/kern/kern_mutex.c Tue Aug 2 02:32:00 2016 (r303654)
+++ head/sys/kern/kern_mutex.c Tue Aug 2 03:05:59 2016 (r303655)
@@ -452,8 +452,10 @@ __mtx_lock_sleep(volatile uintptr_t *c,
if (SCHEDULER_STOPPED())
return;
-#if defined(ADAPTIVE_MUTEXES) || defined(KDTRACE_HOOKS)
+#if defined(ADAPTIVE_MUTEXES)
lock_delay_arg_init(&lda, &mtx_delay);
+#elif defined(KDTRACE_HOOKS)
+ lock_delay_arg_init(&lda, NULL);
#endif
m = mtxlock2mtx(c);
Modified: head/sys/kern/kern_rwlock.c
==============================================================================
--- head/sys/kern/kern_rwlock.c Tue Aug 2 02:32:00 2016 (r303654)
+++ head/sys/kern/kern_rwlock.c Tue Aug 2 03:05:59 2016 (r303655)
@@ -396,8 +396,10 @@ __rw_rlock(volatile uintptr_t *c, const
if (SCHEDULER_STOPPED())
return;
-#if defined(ADAPTIVE_RWLOCKS) || defined(KDTRACE_HOOKS)
+#if defined(ADAPTIVE_RWLOCKS)
lock_delay_arg_init(&lda, &rw_delay);
+#elif defined(KDTRACE_HOOKS)
+ lock_delay_arg_init(&lda, NULL);
#endif
rw = rwlock2rw(c);
@@ -782,8 +784,10 @@ __rw_wlock_hard(volatile uintptr_t *c, u
if (SCHEDULER_STOPPED())
return;
-#if defined(ADAPTIVE_RWLOCKS) || defined(KDTRACE_HOOKS)
+#if defined(ADAPTIVE_RWLOCKS)
lock_delay_arg_init(&lda, &rw_delay);
+#elif defined(KDTRACE_HOOKS)
+ lock_delay_arg_init(&lda, NULL);
#endif
rw = rwlock2rw(c);
Modified: head/sys/kern/kern_sx.c
==============================================================================
--- head/sys/kern/kern_sx.c Tue Aug 2 02:32:00 2016 (r303654)
+++ head/sys/kern/kern_sx.c Tue Aug 2 03:05:59 2016 (r303655)
@@ -554,8 +554,10 @@ _sx_xlock_hard(struct sx *sx, uintptr_t
if (SCHEDULER_STOPPED())
return (0);
-#if defined(ADAPTIVE_SX) || defined(KDTRACE_HOOKS)
+#if defined(ADAPTIVE_SX)
lock_delay_arg_init(&lda, &sx_delay);
+#elif defined(KDTRACE_HOOKS)
+ lock_delay_arg_init(&lda, NULL);
#endif
/* If we already hold an exclusive lock, then recurse. */
@@ -861,8 +863,10 @@ _sx_slock_hard(struct sx *sx, int opts,
if (SCHEDULER_STOPPED())
return (0);
-#if defined(ADAPTIVE_SX) || defined(KDTRACE_HOOKS)
+#if defined(ADAPTIVE_SX)
lock_delay_arg_init(&lda, &sx_delay);
+#elif defined(KDTRACE_HOOKS)
+ lock_delay_arg_init(&lda, NULL);
#endif
#ifdef KDTRACE_HOOKS
state = sx->sx_lock;
More information about the svn-src-head
mailing list