aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'nptl')
-rw-r--r--nptl/Makefile2
-rw-r--r--nptl/Versions8
-rw-r--r--nptl/pthreadP.h2
-rw-r--r--nptl/pthread_setattr_default_np.c10
4 files changed, 16 insertions, 6 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 7b3c56f32c..2ef09fba94 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -145,6 +145,7 @@ routines = \
pthread_rwlockattr_setkind_np \
pthread_rwlockattr_setpshared \
pthread_self \
+ pthread_setattr_default_np \
pthread_setcancelstate \
pthread_setcanceltype \
pthread_setschedparam \
@@ -203,7 +204,6 @@ libpthread-routines = \
pthread_join \
pthread_join_common \
pthread_setaffinity \
- pthread_setattr_default_np \
pthread_setconcurrency \
pthread_setname \
pthread_setschedprio \
diff --git a/nptl/Versions b/nptl/Versions
index 4c1c4ee0a7..de025e179c 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -167,6 +167,9 @@ libc {
pthread_mutexattr_getrobust;
pthread_mutexattr_setrobust;
}
+ GLIBC_2.18 {
+ pthread_setattr_default_np;
+ }
# C11 thread symbols.
GLIBC_2.28 {
call_once;
@@ -230,8 +233,8 @@ libc {
pthread_barrier_wait;
pthread_barrierattr_destroy;
pthread_barrierattr_getpshared;
- pthread_barrierattr_setpshared;
pthread_barrierattr_init;
+ pthread_barrierattr_setpshared;
pthread_cond_clockwait;
pthread_condattr_getclock;
pthread_condattr_getpshared;
@@ -273,6 +276,7 @@ libc {
pthread_rwlockattr_init;
pthread_rwlockattr_setkind_np;
pthread_rwlockattr_setpshared;
+ pthread_setattr_default_np;
pthread_setspecific;
pthread_spin_destroy;
pthread_spin_init;
@@ -299,6 +303,7 @@ libc {
}
GLIBC_PRIVATE {
__default_pthread_attr;
+ __default_pthread_attr_freeres;
__default_pthread_attr_lock;
__futex_abstimed_wait64;
__futex_abstimed_wait_cancelable64;
@@ -436,7 +441,6 @@ libpthread {
GLIBC_2.18 {
pthread_getattr_default_np;
- pthread_setattr_default_np;
}
# C11 thread symbols.
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index d9a6137bd3..8466332248 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -203,7 +203,7 @@ libc_hidden_proto (__default_pthread_attr)
extern int __default_pthread_attr_lock;
libc_hidden_proto (__default_pthread_attr_lock)
/* Called from __libc_freeres to deallocate the default attribute. */
-extern void __default_pthread_attr_freeres (void) attribute_hidden;
+extern void __default_pthread_attr_freeres (void);
/* Size and alignment of static TLS block. */
extern size_t __static_tls_size attribute_hidden;
diff --git a/nptl/pthread_setattr_default_np.c b/nptl/pthread_setattr_default_np.c
index fcf1873d2f..bfdb93bc6e 100644
--- a/nptl/pthread_setattr_default_np.c
+++ b/nptl/pthread_setattr_default_np.c
@@ -20,10 +20,10 @@
#include <stdlib.h>
#include <pthreadP.h>
#include <string.h>
-
+#include <shlib-compat.h>
int
-pthread_setattr_default_np (const pthread_attr_t *in)
+__pthread_setattr_default_np (const pthread_attr_t *in)
{
const struct pthread_attr *real_in;
int ret;
@@ -81,6 +81,12 @@ pthread_setattr_default_np (const pthread_attr_t *in)
lll_unlock (__default_pthread_attr_lock, LLL_PRIVATE);
return ret;
}
+versioned_symbol (libc, __pthread_setattr_default_np,
+ pthread_setattr_default_np, GLIBC_2_34);
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_18, GLIBC_2_34)
+compat_symbol (libc, __pthread_setattr_default_np,
+ pthread_setattr_default_np, GLIBC_2_18);
+#endif
/* This is placed in the same file as pthread_setattr_default_np
because only this function can trigger allocation of attribute