path: root/src/thread/pthread_mutex_unlock.c
diff options
authorRich Felker <>2014-06-10 04:02:40 -0400
committerRich Felker <>2014-06-10 04:02:40 -0400
commitdf15168cf8baf34fb9c94e19eaa1a5c79c853970 (patch)
tree83a61274604cb4b4ed65e617d03d687666cb84c3 /src/thread/pthread_mutex_unlock.c
parent64e32287f9d8a84217834bcc3387e9431cad9e4c (diff)
replace all remaining internal uses of pthread_self with __pthread_self
prior to version 1.1.0, the difference between pthread_self (the public function) and __pthread_self (the internal macro or inline function) was that the former would lazily initialize the thread pointer if it was not already initialized, whereas the latter would crash in this case. since lazy initialization is no longer supported, use of pthread_self no longer makes sense; it simply generates larger, slower code.
Diffstat (limited to 'src/thread/pthread_mutex_unlock.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread/pthread_mutex_unlock.c b/src/thread/pthread_mutex_unlock.c
index 5fc0f4e5..b4bd74b8 100644
--- a/src/thread/pthread_mutex_unlock.c
+++ b/src/thread/pthread_mutex_unlock.c
@@ -13,7 +13,7 @@ int pthread_mutex_unlock(pthread_mutex_t *m)
if (m->_m_type != PTHREAD_MUTEX_NORMAL) {
if (!m->_m_lock)
return EPERM;
- self = pthread_self();
+ self = __pthread_self();
if ((m->_m_lock&0x1fffffff) != self->tid)
return EPERM;
if ((m->_m_type&3) == PTHREAD_MUTEX_RECURSIVE && m->_m_count)