mirror of
https://github.com/fluencelabs/musl
synced 2025-07-01 07:32:04 +00:00
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.
This commit is contained in:
committed by
Rich Felker
parent
6eb19505bc
commit
df7d0dfb9c
@ -50,9 +50,11 @@ int __pthread_mutex_trylock_owner(pthread_mutex_t *m)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pthread_mutex_trylock(pthread_mutex_t *m)
|
||||
int __pthread_mutex_trylock(pthread_mutex_t *m)
|
||||
{
|
||||
if ((m->_m_type&15) == PTHREAD_MUTEX_NORMAL)
|
||||
return a_cas(&m->_m_lock, 0, EBUSY) & EBUSY;
|
||||
return __pthread_mutex_trylock_owner(m);
|
||||
}
|
||||
|
||||
weak_alias(__pthread_mutex_trylock, pthread_mutex_trylock);
|
||||
|
Reference in New Issue
Block a user