about summary refs log tree commit diff
path: root/nptl/pthread_setconcurrency.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-11 20:22:33 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-11 20:33:14 +0200
commitfec776b827755a0aac17a0745bc38c2329aad5ca (patch)
tree6882496f4ff7ad8019be07746936c2cdf34f654c /nptl/pthread_setconcurrency.c
parentd7c51fe4f0efd7f3ca505b5d5b3a02d5d72d9bbd (diff)
downloadglibc-fec776b827755a0aac17a0745bc38c2329aad5ca.tar.gz
glibc-fec776b827755a0aac17a0745bc38c2329aad5ca.tar.xz
glibc-fec776b827755a0aac17a0745bc38c2329aad5ca.zip
nptl: Move pthread_getconcurrency, pthread_setconcurrency into libc
The symbols were moved using scripts/move-symbol-to-libc.py,
in one commit due to their dependency on the internal
__concurrency_level variable.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl/pthread_setconcurrency.c')
-rw-r--r--nptl/pthread_setconcurrency.c11
1 files changed, 9 insertions, 2 deletions
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