svn commit: r303652 - head/sys/kern
Mateusz Guzik
mjg at FreeBSD.org
Tue Aug 2 00:15:10 UTC 2016
Author: mjg
Date: Tue Aug 2 00:15:08 2016
New Revision: 303652
URL: https://svnweb.freebsd.org/changeset/base/303652
Log:
locks: fix up ifdef guards introduced in r303643
Both sx and rwlocks had copy-pasted ADAPTIVE_MUTEXES instead of the correct
define.
MFC after: 1 week
Modified:
head/sys/kern/kern_rwlock.c
head/sys/kern/kern_sx.c
Modified: head/sys/kern/kern_rwlock.c
==============================================================================
--- head/sys/kern/kern_rwlock.c Mon Aug 1 23:07:31 2016 (r303651)
+++ head/sys/kern/kern_rwlock.c Tue Aug 2 00:15:08 2016 (r303652)
@@ -383,7 +383,7 @@ __rw_rlock(volatile uintptr_t *c, const
int contested = 0;
#endif
uintptr_t v;
-#if defined(ADAPTIVE_MUTEXES) || defined(KDTRACE_HOOKS)
+#if defined(ADAPTIVE_RWLOCKS) || defined(KDTRACE_HOOKS)
struct lock_delay_arg lda;
#endif
#ifdef KDTRACE_HOOKS
@@ -396,7 +396,7 @@ __rw_rlock(volatile uintptr_t *c, const
if (SCHEDULER_STOPPED())
return;
-#if defined(ADAPTIVE_MUTEXES) || defined(KDTRACE_HOOKS)
+#if defined(ADAPTIVE_RWLOCKS) || defined(KDTRACE_HOOKS)
lock_delay_arg_init(&lda, &rw_delay);
#endif
rw = rwlock2rw(c);
@@ -769,7 +769,7 @@ __rw_wlock_hard(volatile uintptr_t *c, u
uint64_t waittime = 0;
int contested = 0;
#endif
-#if defined(ADAPTIVE_MUTEXES) || defined(KDTRACE_HOOKS)
+#if defined(ADAPTIVE_RWLOCKS) || defined(KDTRACE_HOOKS)
struct lock_delay_arg lda;
#endif
#ifdef KDTRACE_HOOKS
@@ -782,7 +782,7 @@ __rw_wlock_hard(volatile uintptr_t *c, u
if (SCHEDULER_STOPPED())
return;
-#if defined(ADAPTIVE_MUTEXES) || defined(KDTRACE_HOOKS)
+#if defined(ADAPTIVE_RWLOCKS) || defined(KDTRACE_HOOKS)
lock_delay_arg_init(&lda, &rw_delay);
#endif
rw = rwlock2rw(c);
Modified: head/sys/kern/kern_sx.c
==============================================================================
--- head/sys/kern/kern_sx.c Mon Aug 1 23:07:31 2016 (r303651)
+++ head/sys/kern/kern_sx.c Tue Aug 2 00:15:08 2016 (r303652)
@@ -541,7 +541,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t
int contested = 0;
#endif
int error = 0;
-#if defined(ADAPTIVE_MUTEXES) || defined(KDTRACE_HOOKS)
+#if defined(ADAPTIVE_SX) || defined(KDTRACE_HOOKS)
struct lock_delay_arg lda;
#endif
#ifdef KDTRACE_HOOKS
@@ -554,7 +554,7 @@ _sx_xlock_hard(struct sx *sx, uintptr_t
if (SCHEDULER_STOPPED())
return (0);
-#if defined(ADAPTIVE_MUTEXES) || defined(KDTRACE_HOOKS)
+#if defined(ADAPTIVE_SX) || defined(KDTRACE_HOOKS)
lock_delay_arg_init(&lda, &sx_delay);
#endif
@@ -848,7 +848,7 @@ _sx_slock_hard(struct sx *sx, int opts,
#endif
uintptr_t x;
int error = 0;
-#if defined(ADAPTIVE_MUTEXES) || defined(KDTRACE_HOOKS)
+#if defined(ADAPTIVE_SX) || defined(KDTRACE_HOOKS)
struct lock_delay_arg lda;
#endif
#ifdef KDTRACE_HOOKS
@@ -861,7 +861,7 @@ _sx_slock_hard(struct sx *sx, int opts,
if (SCHEDULER_STOPPED())
return (0);
-#if defined(ADAPTIVE_MUTEXES) || defined(KDTRACE_HOOKS)
+#if defined(ADAPTIVE_SX) || defined(KDTRACE_HOOKS)
lock_delay_arg_init(&lda, &sx_delay);
#endif
#ifdef KDTRACE_HOOKS
More information about the svn-src-head
mailing list