diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-04-23 09:46:57 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-04-23 09:51:56 +0200 |
commit | 506385d30ec67279b21929f117b292bbbe8f5e7b (patch) | |
tree | 603077d778d62228809989072ae011869b5e9dd4 /nptl | |
parent | 2a23e899e255f9ce2b4024d4ec029ce57af518bd (diff) | |
download | glibc-506385d30ec67279b21929f117b292bbbe8f5e7b.zip glibc-506385d30ec67279b21929f117b292bbbe8f5e7b.tar.gz glibc-506385d30ec67279b21929f117b292bbbe8f5e7b.tar.bz2 |
nptl: Move pthread_mutexattr_init, __pthread_mutexattr_init into libc
__pthread_mutexattr_init cannot be be made a compat symbol because
it is used in mtx_init, which is still in libpthread.
The symbols were moved using scripts/move-symbol-to-libc.py.
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/Makefile | 2 | ||||
-rw-r--r-- | nptl/Versions | 6 | ||||
-rw-r--r-- | nptl/pthreadP.h | 1 | ||||
-rw-r--r-- | nptl/pthread_mutexattr_init.c | 17 |
4 files changed, 18 insertions, 8 deletions
diff --git a/nptl/Makefile b/nptl/Makefile index a7c2c06..51a4740 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -109,6 +109,7 @@ routines = \ pthread_mutexattr_getpshared \ pthread_mutexattr_getrobust \ pthread_mutexattr_gettype \ + pthread_mutexattr_init \ pthread_once \ pthread_rwlock_rdlock \ pthread_rwlock_unlock \ @@ -168,7 +169,6 @@ libpthread-routines = \ pthread_getname \ pthread_join \ pthread_join_common \ - pthread_mutexattr_init \ pthread_mutexattr_setprioceiling \ pthread_mutexattr_setprotocol \ pthread_mutexattr_setpshared \ diff --git a/nptl/Versions b/nptl/Versions index a04fb94..1639efb 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -8,6 +8,7 @@ libc { __pthread_mutex_trylock; __pthread_mutex_unlock; __pthread_mutexattr_destroy; + __pthread_mutexattr_init; __pthread_once; __pthread_setspecific; _pthread_cleanup_pop; @@ -50,6 +51,7 @@ libc { pthread_mutex_unlock; pthread_mutexattr_destroy; pthread_mutexattr_getkind_np; + pthread_mutexattr_init; pthread_once; pthread_self; pthread_setcancelstate; @@ -132,6 +134,7 @@ libc { __pthread_mutex_init; __pthread_mutex_lock; __pthread_mutex_unlock; + __pthread_mutexattr_init; __pthread_once; __pthread_setspecific; pthread_cond_clockwait; @@ -148,6 +151,7 @@ libc { pthread_mutexattr_getprotocol; pthread_mutexattr_getrobust; pthread_mutexattr_gettype; + pthread_mutexattr_init; pthread_once; pthread_rwlock_rdlock; pthread_rwlock_unlock; @@ -211,7 +215,6 @@ libpthread { _IO_funlockfile; __errno_location; __h_errno_location; - __pthread_mutexattr_init; __pthread_mutexattr_settype; _exit; flockfile; @@ -221,7 +224,6 @@ libpthread { pthread_create; pthread_detach; pthread_join; - pthread_mutexattr_init; pthread_mutexattr_setkind_np; pthread_sigmask; pthread_testcancel; diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index 8432c0e..115dbed 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -579,7 +579,6 @@ libc_hidden_proto (__pthread_sigmask); #if IS_IN (libpthread) hidden_proto (__pthread_rwlock_unlock) hidden_proto (__pthread_testcancel) -hidden_proto (__pthread_mutexattr_init) hidden_proto (__pthread_mutexattr_settype) #endif diff --git a/nptl/pthread_mutexattr_init.c b/nptl/pthread_mutexattr_init.c index 945d434..ca0c5e9 100644 --- a/nptl/pthread_mutexattr_init.c +++ b/nptl/pthread_mutexattr_init.c @@ -18,10 +18,10 @@ #include <string.h> #include <pthreadP.h> - +#include <shlib-compat.h> int -__pthread_mutexattr_init (pthread_mutexattr_t *attr) +___pthread_mutexattr_init (pthread_mutexattr_t *attr) { ASSERT_TYPE_SIZE (pthread_mutexattr_t, __SIZEOF_PTHREAD_MUTEXATTR_T); ASSERT_PTHREAD_INTERNAL_SIZE (pthread_mutexattr_t, @@ -37,5 +37,14 @@ __pthread_mutexattr_init (pthread_mutexattr_t *attr) return 0; } -weak_alias (__pthread_mutexattr_init, pthread_mutexattr_init) -hidden_def (__pthread_mutexattr_init) +versioned_symbol (libc, ___pthread_mutexattr_init, + pthread_mutexattr_init, GLIBC_2_34); +versioned_symbol (libc, ___pthread_mutexattr_init, + __pthread_mutexattr_init, GLIBC_2_34); + +#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_34) +compat_symbol (libpthread, ___pthread_mutexattr_init, + pthread_mutexattr_init, GLIBC_2_0); +compat_symbol (libpthread, ___pthread_mutexattr_init, + __pthread_mutexattr_init, GLIBC_2_0); +#endif |