aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-04-23 09:46:15 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-04-23 09:51:19 +0200
commit2a23e899e255f9ce2b4024d4ec029ce57af518bd (patch)
tree67a857a38112bc5e05b9a6577ccfebe0857b5ded /nptl
parent9b7ab14e112476c96e7b20fb23e6838b7012dfda (diff)
downloadglibc-2a23e899e255f9ce2b4024d4ec029ce57af518bd.zip
glibc-2a23e899e255f9ce2b4024d4ec029ce57af518bd.tar.gz
glibc-2a23e899e255f9ce2b4024d4ec029ce57af518bd.tar.bz2
nptl: Move pthread_mutexattr_gettype into libc
And pthread_mutexattr_getkind_np as a compatibility symbol. (There is no declaration in <pthread.h>, so there is no need to add an alias or a deprecation warning there.) The symbols were moved using scripts/move-symbol-to-libc.py.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/Makefile2
-rw-r--r--nptl/Versions5
-rw-r--r--nptl/pthread_mutexattr_gettype.c17
3 files changed, 18 insertions, 6 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 196c03b..a7c2c06 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -108,6 +108,7 @@ routines = \
pthread_mutexattr_getprotocol \
pthread_mutexattr_getpshared \
pthread_mutexattr_getrobust \
+ pthread_mutexattr_gettype \
pthread_once \
pthread_rwlock_rdlock \
pthread_rwlock_unlock \
@@ -167,7 +168,6 @@ libpthread-routines = \
pthread_getname \
pthread_join \
pthread_join_common \
- pthread_mutexattr_gettype \
pthread_mutexattr_init \
pthread_mutexattr_setprioceiling \
pthread_mutexattr_setprotocol \
diff --git a/nptl/Versions b/nptl/Versions
index c452d41..a04fb94 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -49,6 +49,7 @@ libc {
pthread_mutex_trylock;
pthread_mutex_unlock;
pthread_mutexattr_destroy;
+ pthread_mutexattr_getkind_np;
pthread_once;
pthread_self;
pthread_setcancelstate;
@@ -59,6 +60,7 @@ libc {
}
GLIBC_2.1 {
pthread_attr_init;
+ pthread_mutexattr_gettype;
pthread_rwlock_rdlock;
pthread_rwlock_unlock;
pthread_rwlock_wrlock;
@@ -145,6 +147,7 @@ libc {
pthread_mutexattr_getprioceiling;
pthread_mutexattr_getprotocol;
pthread_mutexattr_getrobust;
+ pthread_mutexattr_gettype;
pthread_once;
pthread_rwlock_rdlock;
pthread_rwlock_unlock;
@@ -218,7 +221,6 @@ libpthread {
pthread_create;
pthread_detach;
pthread_join;
- pthread_mutexattr_getkind_np;
pthread_mutexattr_init;
pthread_mutexattr_setkind_np;
pthread_sigmask;
@@ -240,7 +242,6 @@ libpthread {
pthread_attr_setstacksize;
pthread_create;
pthread_getconcurrency;
- pthread_mutexattr_gettype;
pthread_mutexattr_settype;
pthread_rwlock_destroy;
pthread_rwlock_init;
diff --git a/nptl/pthread_mutexattr_gettype.c b/nptl/pthread_mutexattr_gettype.c
index 06234d4..e091087 100644
--- a/nptl/pthread_mutexattr_gettype.c
+++ b/nptl/pthread_mutexattr_gettype.c
@@ -17,10 +17,10 @@
<https://www.gnu.org/licenses/>. */
#include <pthreadP.h>
-
+#include <shlib-compat.h>
int
-pthread_mutexattr_gettype (const pthread_mutexattr_t *attr, int *kind)
+__pthread_mutexattr_gettype (const pthread_mutexattr_t *attr, int *kind)
{
const struct pthread_mutexattr *iattr;
@@ -31,4 +31,15 @@ pthread_mutexattr_gettype (const pthread_mutexattr_t *attr, int *kind)
return 0;
}
-weak_alias (pthread_mutexattr_gettype, pthread_mutexattr_getkind_np)
+versioned_symbol (libc, __pthread_mutexattr_gettype,
+ pthread_mutexattr_gettype, GLIBC_2_34);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_34)
+compat_symbol (libpthread, __pthread_mutexattr_gettype,
+ pthread_mutexattr_getkind_np, GLIBC_2_0);
+#endif
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_1, GLIBC_2_34)
+compat_symbol (libpthread, __pthread_mutexattr_gettype,
+ pthread_mutexattr_gettype, GLIBC_2_1);
+#endif