diff options
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/Makefile | 2 | ||||
-rw-r--r-- | nptl/Versions | 5 | ||||
-rw-r--r-- | nptl/libpthread-compat.c | 5 | ||||
-rw-r--r-- | nptl/pthread_setschedprio.c | 13 |
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, ¶m) == -1)) + if (__glibc_unlikely (__sched_setparam (pd->tid, ¶m) == -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 |