aboutsummaryrefslogtreecommitdiff
path: root/sys/sys
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2017-09-27 00:57:05 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2017-09-27 00:57:05 +0000
commit2f1ddb89fc45b2fdb57263beade562da5c0ec02b (patch)
tree27fb8545cb136fa194e7da727948b30de023b384 /sys/sys
parenta8462c582cf873928905b473d08c4c320e44225b (diff)
downloadsrc-2f1ddb89fc45b2fdb57263beade562da5c0ec02b.tar.gz
src-2f1ddb89fc45b2fdb57263beade562da5c0ec02b.zip
mtx: drop the tid argument from _mtx_lock_sleep
tid must be equal to curthread and the target routine was already reading it anyway, which is not a problem. Not passing it as a parameter allows for a little bit shorter code in callers. MFC after: 1 week
Notes
Notes: svn path=/head/; revision=324041
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/mutex.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h
index 0097d0800a48..6f73e1fd52c0 100644
--- a/sys/sys/mutex.h
+++ b/sys/sys/mutex.h
@@ -99,12 +99,12 @@ int _mtx_trylock_flags_(volatile uintptr_t *c, int opts, const char *file,
int line);
void mutex_init(void);
#if LOCK_DEBUG > 0
-void __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v, uintptr_t tid,
- int opts, const char *file, int line);
+void __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v, int opts,
+ const char *file, int line);
void __mtx_unlock_sleep(volatile uintptr_t *c, int opts, const char *file,
int line);
#else
-void __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v, uintptr_t tid);
+void __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v);
void __mtx_unlock_sleep(volatile uintptr_t *c);
#endif
@@ -147,13 +147,13 @@ void thread_lock_flags_(struct thread *, int, const char *, int);
#define mtx_trylock_flags_(m, o, f, l) \
_mtx_trylock_flags_(&(m)->mtx_lock, o, f, l)
#if LOCK_DEBUG > 0
-#define _mtx_lock_sleep(m, v, t, o, f, l) \
- __mtx_lock_sleep(&(m)->mtx_lock, v, t, o, f, l)
+#define _mtx_lock_sleep(m, v, o, f, l) \
+ __mtx_lock_sleep(&(m)->mtx_lock, v, o, f, l)
#define _mtx_unlock_sleep(m, o, f, l) \
__mtx_unlock_sleep(&(m)->mtx_lock, o, f, l)
#else
-#define _mtx_lock_sleep(m, v, t, o, f, l) \
- __mtx_lock_sleep(&(m)->mtx_lock, v, t)
+#define _mtx_lock_sleep(m, v, o, f, l) \
+ __mtx_lock_sleep(&(m)->mtx_lock, v)
#define _mtx_unlock_sleep(m, o, f, l) \
__mtx_unlock_sleep(&(m)->mtx_lock)
#endif
@@ -208,7 +208,7 @@ void thread_lock_flags_(struct thread *, int, const char *, int);
\
if (__predict_false(LOCKSTAT_PROFILE_ENABLED(adaptive__acquire) ||\
!_mtx_obtain_lock_fetch((mp), &_v, _tid))) \
- _mtx_lock_sleep((mp), _v, _tid, (opts), (file), (line));\
+ _mtx_lock_sleep((mp), _v, (opts), (file), (line)); \
} while (0)
/*