aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-05-17 09:59:14 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-05-17 10:25:12 +0200
commit56f823abd43c897aa79d89b447fa31b6bb3f14db (patch)
treeca7d54a4dbe7bb4387b1474806e67264e804ec83 /nptl
parent8bc6a6d73c7f9004bfa3e81a717300e6d39ac448 (diff)
downloadglibc-56f823abd43c897aa79d89b447fa31b6bb3f14db.tar
glibc-56f823abd43c897aa79d89b447fa31b6bb3f14db.tar.gz
glibc-56f823abd43c897aa79d89b447fa31b6bb3f14db.tar.bz2
glibc-56f823abd43c897aa79d89b447fa31b6bb3f14db.zip
nptl: Move pthread_setschedprio into libc
The symbol was moved using scripts/move-symbol-to-libc.py. The GLIBC_2.3.4 version is now empty, so add a placeholder symbol. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nptl')
-rw-r--r--nptl/Makefile2
-rw-r--r--nptl/Versions5
-rw-r--r--nptl/libpthread-compat.c5
-rw-r--r--nptl/pthread_setschedprio.c13
4 files changed, 19 insertions, 6 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 5a271fed87..d4cff359b5 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -176,6 +176,7 @@ routines = \
pthread_setconcurrency \
pthread_setname \
pthread_setschedparam \
+ pthread_setschedprio \
pthread_setspecific \
pthread_sigmask \
pthread_spin_destroy \
@@ -210,7 +211,6 @@ libpthread-routines = \
nptl-init \
pt-interp \
pthread_create \
- pthread_setschedprio \
pthread_sigqueue \
version \
diff --git a/nptl/Versions b/nptl/Versions
index d9a5c0ee88..1629441f11 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -174,6 +174,7 @@ libc {
pthread_attr_getaffinity_np;
pthread_attr_setaffinity_np;
pthread_setaffinity_np;
+ pthread_setschedprio;
}
GLIBC_2.4 {
pthread_mutex_consistent_np;
@@ -332,6 +333,7 @@ libc {
pthread_setattr_default_np;
pthread_setconcurrency;
pthread_setname_np;
+ pthread_setschedprio;
pthread_setspecific;
pthread_spin_destroy;
pthread_spin_init;
@@ -462,8 +464,7 @@ libpthread {
}
GLIBC_2.3.4 {
- pthread_getaffinity_np;
- pthread_setschedprio;
+ __libpthread_version_placeholder;
}
GLIBC_2.4 {
diff --git a/nptl/libpthread-compat.c b/nptl/libpthread-compat.c
index b1bee36f36..4d29a4c781 100644
--- a/nptl/libpthread-compat.c
+++ b/nptl/libpthread-compat.c
@@ -75,6 +75,11 @@ compat_symbol (libpthread, __libpthread_version_placeholder_1,
__libpthread_version_placeholder, GLIBC_2_3_3);
#endif
+#if (SHLIB_COMPAT (libpthread, GLIBC_2_3_4, GLIBC_2_4))
+compat_symbol (libpthread, __libpthread_version_placeholder_1,
+ __libpthread_version_placeholder, GLIBC_2_3_4);
+#endif
+
#if (SHLIB_COMPAT (libpthread, GLIBC_2_4, GLIBC_2_5))
compat_symbol (libpthread, __libpthread_version_placeholder_1,
__libpthread_version_placeholder, GLIBC_2_4);
diff --git a/nptl/pthread_setschedprio.c b/nptl/pthread_setschedprio.c
index bc60ff0451..7bb68d3231 100644
--- a/nptl/pthread_setschedprio.c
+++ b/nptl/pthread_setschedprio.c
@@ -22,10 +22,10 @@
#include <sched.h>
#include "pthreadP.h"
#include <lowlevellock.h>
-
+#include <shlib-compat.h>
int
-pthread_setschedprio (pthread_t threadid, int prio)
+__pthread_setschedprio (pthread_t threadid, int prio)
{
struct pthread *pd = (struct pthread *) threadid;
@@ -47,7 +47,7 @@ pthread_setschedprio (pthread_t threadid, int prio)
param.sched_priority = pd->tpp->priomax;
/* Try to set the scheduler information. */
- if (__glibc_unlikely (sched_setparam (pd->tid, &param) == -1))
+ if (__glibc_unlikely (__sched_setparam (pd->tid, &param) == -1))
result = errno;
else
{
@@ -62,3 +62,10 @@ pthread_setschedprio (pthread_t threadid, int prio)
return result;
}
+versioned_symbol (libc, __pthread_setschedprio, pthread_setschedprio,
+ GLIBC_2_34);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_3_4, GLIBC_2_34)
+compat_symbol (libpthread, __pthread_setschedprio, pthread_setschedprio,
+ GLIBC_2_3_4);
+#endif