path: root/src/thread/pthread_mutex_unlock.c
diff options
authorJens Gustedt <>2014-09-01 00:46:23 +0200
committerRich Felker <>2014-09-06 18:11:24 -0400
commitdf7d0dfb9c686df31149d09008ba92834bed9803 (patch)
tree758743956de08b94514757bda68a628751d0f533 /src/thread/pthread_mutex_unlock.c
parent6eb19505bc10eb7964c4863e53ef1028944044f2 (diff)
use weak symbols for the POSIX functions that will be used by C threads
The intent of this is to avoid name space pollution of the C threads implementation. This has two sides to it. First we have to provide symbols that wouldn't pollute the name space for the C threads implementation. Second we have to clean up some internal uses of POSIX functions such that they don't implicitly drag in such symbols.
Diffstat (limited to 'src/thread/pthread_mutex_unlock.c')
1 files changed, 3 insertions, 1 deletions
diff --git a/src/thread/pthread_mutex_unlock.c b/src/thread/pthread_mutex_unlock.c
index 46761d9a..a7f39c7f 100644
--- a/src/thread/pthread_mutex_unlock.c
+++ b/src/thread/pthread_mutex_unlock.c
@@ -3,7 +3,7 @@
void __vm_lock_impl(int);
void __vm_unlock_impl(void);
-int pthread_mutex_unlock(pthread_mutex_t *m)
+int __pthread_mutex_unlock(pthread_mutex_t *m)
pthread_t self;
int waiters = m->_m_waiters;
@@ -36,3 +36,5 @@ int pthread_mutex_unlock(pthread_mutex_t *m)
__wake(&m->_m_lock, 1, priv);
return 0;
+weak_alias(__pthread_mutex_unlock, pthread_mutex_unlock);