aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'nptl')
-rw-r--r--nptl/Makefile4
-rw-r--r--nptl/Versions6
-rw-r--r--nptl/pthread_getconcurrency.c11
-rw-r--r--nptl/pthread_setconcurrency.c11
4 files changed, 24 insertions, 8 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 5ce295c96f..37a762d530 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -113,6 +113,7 @@ routines = \
pthread_exit \
pthread_getaffinity \
pthread_getattr_np \
+ pthread_getconcurrency \
pthread_getschedparam \
pthread_getspecific \
pthread_join \
@@ -167,6 +168,7 @@ routines = \
pthread_setattr_default_np \
pthread_setcancelstate \
pthread_setcanceltype \
+ pthread_setconcurrency \
pthread_setschedparam \
pthread_setspecific \
pthread_sigmask \
@@ -204,11 +206,9 @@ libpthread-routines = \
pt-interp \
pthread_create \
pthread_getattr_default_np \
- pthread_getconcurrency \
pthread_getcpuclockid \
pthread_getname \
pthread_setaffinity \
- pthread_setconcurrency \
pthread_setname \
pthread_setschedprio \
pthread_sigqueue \
diff --git a/nptl/Versions b/nptl/Versions
index 776abde320..1dd3fbc18c 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -80,6 +80,7 @@ libc {
pthread_attr_setguardsize;
pthread_attr_setstackaddr;
pthread_attr_setstacksize;
+ pthread_getconcurrency;
pthread_mutexattr_gettype;
pthread_mutexattr_settype;
pthread_rwlock_destroy;
@@ -95,6 +96,7 @@ libc {
pthread_rwlockattr_init;
pthread_rwlockattr_setkind_np;
pthread_rwlockattr_setpshared;
+ pthread_setconcurrency;
sem_destroy;
sem_getvalue;
sem_init;
@@ -280,6 +282,7 @@ libc {
pthread_condattr_setclock;
pthread_condattr_setpshared;
pthread_detach;
+ pthread_getconcurrency;
pthread_getspecific;
pthread_join;
pthread_key_create;
@@ -318,6 +321,7 @@ libc {
pthread_rwlockattr_setkind_np;
pthread_rwlockattr_setpshared;
pthread_setattr_default_np;
+ pthread_setconcurrency;
pthread_setspecific;
pthread_spin_destroy;
pthread_spin_init;
@@ -414,8 +418,6 @@ libpthread {
GLIBC_2.1 {
pthread_create;
- pthread_getconcurrency;
- pthread_setconcurrency;
}
GLIBC_2.1.1 {
diff --git a/nptl/pthread_getconcurrency.c b/nptl/pthread_getconcurrency.c
index 2ff9afa51b..387f7ffa39 100644
--- a/nptl/pthread_getconcurrency.c
+++ b/nptl/pthread_getconcurrency.c
@@ -17,10 +17,17 @@
<https://www.gnu.org/licenses/>. */
#include "pthreadP.h"
-
+#include <shlib-compat.h>
int
-pthread_getconcurrency (void)
+__pthread_getconcurrency (void)
{
return __concurrency_level;
}
+versioned_symbol (libc, __pthread_getconcurrency, pthread_getconcurrency,
+ GLIBC_2_34);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_1, GLIBC_2_34)
+compat_symbol (libpthread, __pthread_getconcurrency, pthread_getconcurrency,
+ GLIBC_2_1);
+#endif
diff --git a/nptl/pthread_setconcurrency.c b/nptl/pthread_setconcurrency.c
index e58a1446f4..5bc93ddaef 100644
--- a/nptl/pthread_setconcurrency.c
+++ b/nptl/pthread_setconcurrency.c
@@ -18,14 +18,14 @@
#include <errno.h>
#include "pthreadP.h"
-
+#include <shlib-compat.h>
/* Global definition. Needed in pthread_getconcurrency as well. */
int __concurrency_level;
int
-pthread_setconcurrency (int level)
+__pthread_setconcurrency (int level)
{
if (level < 0)
return EINVAL;
@@ -37,3 +37,10 @@ pthread_setconcurrency (int level)
return 0;
}
+versioned_symbol (libc, __pthread_setconcurrency, pthread_setconcurrency,
+ GLIBC_2_34);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_1, GLIBC_2_34)
+compat_symbol (libpthread, __pthread_setconcurrency, pthread_setconcurrency,
+ GLIBC_2_1);
+#endif