aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'nptl')
-rw-r--r--nptl/Makefile2
-rw-r--r--nptl/Versions6
-rw-r--r--nptl/libpthread-compat.c5
-rw-r--r--nptl/pthread_mutexattr_setrobust.c17
4 files changed, 24 insertions, 6 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 1565beb..27588a8 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -113,6 +113,7 @@ routines = \
pthread_mutexattr_setprioceiling \
pthread_mutexattr_setprotocol \
pthread_mutexattr_setpshared \
+ pthread_mutexattr_setrobust \
pthread_once \
pthread_rwlock_rdlock \
pthread_rwlock_unlock \
@@ -172,7 +173,6 @@ libpthread-routines = \
pthread_getname \
pthread_join \
pthread_join_common \
- pthread_mutexattr_setrobust \
pthread_mutexattr_settype \
pthread_rwlock_clockrdlock \
pthread_rwlock_clockwrlock \
diff --git a/nptl/Versions b/nptl/Versions
index e290914..97eb605 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -105,10 +105,12 @@ libc {
pthread_mutexattr_getrobust_np;
pthread_mutexattr_setprioceiling;
pthread_mutexattr_setprotocol;
+ pthread_mutexattr_setrobust_np;
}
GLIBC_2.12 {
pthread_mutex_consistent;
pthread_mutexattr_getrobust;
+ pthread_mutexattr_setrobust;
}
# C11 thread symbols.
GLIBC_2.28 {
@@ -158,6 +160,7 @@ libc {
pthread_mutexattr_setprioceiling;
pthread_mutexattr_setprotocol;
pthread_mutexattr_setpshared;
+ pthread_mutexattr_setrobust;
pthread_once;
pthread_rwlock_rdlock;
pthread_rwlock_unlock;
@@ -342,7 +345,7 @@ libpthread {
}
GLIBC_2.4 {
- pthread_mutexattr_setrobust_np;
+ __libpthread_version_placeholder;
};
GLIBC_2.11 {
@@ -351,7 +354,6 @@ libpthread {
GLIBC_2.12 {
pthread_getname_np;
- pthread_mutexattr_setrobust;
pthread_setname_np;
};
diff --git a/nptl/libpthread-compat.c b/nptl/libpthread-compat.c
index 359a381..761ca8d 100644
--- a/nptl/libpthread-compat.c
+++ b/nptl/libpthread-compat.c
@@ -55,3 +55,8 @@ compat_symbol (libpthread, __libpthread_version_placeholder_1,
compat_symbol (libpthread, __libpthread_version_placeholder_1,
__libpthread_version_placeholder, GLIBC_2_3_2);
#endif
+
+#if (SHLIB_COMPAT (libpthread, GLIBC_2_4, GLIBC_2_5))
+compat_symbol (libpthread, __libpthread_version_placeholder_1,
+ __libpthread_version_placeholder, GLIBC_2_4);
+#endif
diff --git a/nptl/pthread_mutexattr_setrobust.c b/nptl/pthread_mutexattr_setrobust.c
index 1b39ded..a7b1192 100644
--- a/nptl/pthread_mutexattr_setrobust.c
+++ b/nptl/pthread_mutexattr_setrobust.c
@@ -18,10 +18,10 @@
#include <errno.h>
#include <pthreadP.h>
-
+#include <shlib-compat.h>
int
-pthread_mutexattr_setrobust (pthread_mutexattr_t *attr, int robustness)
+__pthread_mutexattr_setrobust (pthread_mutexattr_t *attr, int robustness)
{
if (robustness != PTHREAD_MUTEX_STALLED_NP
&& __builtin_expect (robustness != PTHREAD_MUTEX_ROBUST_NP, 0))
@@ -38,4 +38,15 @@ pthread_mutexattr_setrobust (pthread_mutexattr_t *attr, int robustness)
return 0;
}
-weak_alias (pthread_mutexattr_setrobust, pthread_mutexattr_setrobust_np)
+versioned_symbol (libc, __pthread_mutexattr_setrobust,
+ pthread_mutexattr_setrobust, GLIBC_2_34);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_4, GLIBC_2_34)
+compat_symbol (libpthread, __pthread_mutexattr_setrobust,
+ pthread_mutexattr_setrobust_np, GLIBC_2_4);
+#endif
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_12, GLIBC_2_34)
+compat_symbol (libpthread, __pthread_mutexattr_setrobust,
+ pthread_mutexattr_setrobust, GLIBC_2_12);
+#endif