mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
nptl: Move core mutex functions into libc
This is complicated because of a second compilation of nptl/pthread_mutex_lock.c via nptl/pthread_mutex_cond_lock.c. PTHREAD_MUTEX_VERSIONS is introduced to suppress symbol versions in that case. The symbols __pthread_mutex_lock, __pthread_mutex_unlock, __pthread_mutex_init, __pthread_mutex_destroy, pthread_mutex_lock, pthread_mutex_unlock, pthread_mutex_init, pthread_mutex_destroy have been moved using scripts/move-symbol-to-libc.py. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
@ -25,6 +25,7 @@
|
||||
#include <atomic.h>
|
||||
#include <pthread-offsets.h>
|
||||
#include <futex-internal.h>
|
||||
#include <shlib-compat.h>
|
||||
|
||||
#include <stap-probe.h>
|
||||
|
||||
@ -48,7 +49,7 @@ prio_inherit_missing (void)
|
||||
}
|
||||
|
||||
int
|
||||
__pthread_mutex_init (pthread_mutex_t *mutex,
|
||||
___pthread_mutex_init (pthread_mutex_t *mutex,
|
||||
const pthread_mutexattr_t *mutexattr)
|
||||
{
|
||||
const struct pthread_mutexattr *imutexattr;
|
||||
@ -150,5 +151,12 @@ __pthread_mutex_init (pthread_mutex_t *mutex,
|
||||
|
||||
return 0;
|
||||
}
|
||||
weak_alias (__pthread_mutex_init, pthread_mutex_init)
|
||||
hidden_def (__pthread_mutex_init)
|
||||
versioned_symbol (libpthread, ___pthread_mutex_init, __pthread_mutex_init,
|
||||
GLIBC_2_34);
|
||||
libc_hidden_ver (___pthread_mutex_init, __pthread_mutex_init)
|
||||
versioned_symbol (libpthread, ___pthread_mutex_init, pthread_mutex_init,
|
||||
GLIBC_2_0);
|
||||
#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_34)
|
||||
compat_symbol (libpthread, ___pthread_mutex_init, __pthread_mutex_init,
|
||||
GLIBC_2_0);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user