aboutsummaryrefslogtreecommitdiff
path: root/nptl/pthread_setschedprio.c
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/pthread_setschedprio.c
parent8bc6a6d73c7f9004bfa3e81a717300e6d39ac448 (diff)
downloadglibc-56f823abd43c897aa79d89b447fa31b6bb3f14db.zip
glibc-56f823abd43c897aa79d89b447fa31b6bb3f14db.tar.gz
glibc-56f823abd43c897aa79d89b447fa31b6bb3f14db.tar.bz2
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/pthread_setschedprio.c')
-rw-r--r--nptl/pthread_setschedprio.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/nptl/pthread_setschedprio.c b/nptl/pthread_setschedprio.c
index bc60ff0..7bb68d3 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