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
commit7b300ec7f9a5a271f2169aa6e924184a41b3a9a8 (patch)
treed13702e187c0e4ece4af31ed8cd1ed38baebbbfd /nptl
parentc924e44acddc7b1e259da21ee101085006071cef (diff)
downloadglibc-7b300ec7f9a5a271f2169aa6e924184a41b3a9a8.zip
glibc-7b300ec7f9a5a271f2169aa6e924184a41b3a9a8.tar.gz
glibc-7b300ec7f9a5a271f2169aa6e924184a41b3a9a8.tar.bz2
nptl: Move pthread_setaffinity_np into libc
The symbol was moved using scripts/move-symbol-to-libc.py. 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_setaffinity.c10
4 files changed, 16 insertions, 6 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 516410c..a33f495 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -169,6 +169,7 @@ routines = \
pthread_rwlockattr_setkind_np \
pthread_rwlockattr_setpshared \
pthread_self \
+ pthread_setaffinity \
pthread_setattr_default_np \
pthread_setcancelstate \
pthread_setcanceltype \
@@ -208,7 +209,6 @@ libpthread-routines = \
nptl-init \
pt-interp \
pthread_create \
- pthread_setaffinity \
pthread_setname \
pthread_setschedprio \
pthread_sigqueue \
diff --git a/nptl/Versions b/nptl/Versions
index 8c8c3b0..289063e 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -166,12 +166,14 @@ libc {
pthread_condattr_getclock;
pthread_condattr_setclock;
pthread_getaffinity_np;
+ pthread_setaffinity_np;
pthread_timedjoin_np;
pthread_tryjoin_np;
}
GLIBC_2.3.4 {
pthread_attr_getaffinity_np;
pthread_attr_setaffinity_np;
+ pthread_setaffinity_np;
}
GLIBC_2.4 {
pthread_mutex_consistent_np;
@@ -454,12 +456,11 @@ libpthread {
}
GLIBC_2.3.3 {
- pthread_setaffinity_np;
+ __libpthread_version_placeholder;
}
GLIBC_2.3.4 {
pthread_getaffinity_np;
- pthread_setaffinity_np;
pthread_setschedprio;
}
diff --git a/nptl/libpthread-compat.c b/nptl/libpthread-compat.c
index 1806987..a0c0102 100644
--- a/nptl/libpthread-compat.c
+++ b/nptl/libpthread-compat.c
@@ -70,6 +70,11 @@ compat_symbol (libpthread, __libpthread_version_placeholder_1,
__libpthread_version_placeholder, GLIBC_2_3_2);
#endif
+#if (SHLIB_COMPAT (libpthread, GLIBC_2_3_3, GLIBC_2_3_4))
+compat_symbol (libpthread, __libpthread_version_placeholder_1,
+ __libpthread_version_placeholder, GLIBC_2_3_3);
+#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_setaffinity.c b/nptl/pthread_setaffinity.c
index e0226ea..3bfdc63 100644
--- a/nptl/pthread_setaffinity.c
+++ b/nptl/pthread_setaffinity.c
@@ -37,11 +37,15 @@ __pthread_setaffinity_new (pthread_t th, size_t cpusetsize,
? INTERNAL_SYSCALL_ERRNO (res)
: 0);
}
-versioned_symbol (libpthread, __pthread_setaffinity_new,
- pthread_setaffinity_np, GLIBC_2_3_4);
+versioned_symbol (libc, __pthread_setaffinity_new,
+ pthread_setaffinity_np, GLIBC_2_34);
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_3_4, GLIBC_2_34)
+compat_symbol (libpthread, __pthread_setaffinity_new,
+ pthread_setaffinity_np, GLIBC_2_3_4);
+#endif
-#if SHLIB_COMPAT (libpthread, GLIBC_2_3_3, GLIBC_2_3_4)
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_3_3, GLIBC_2_3_4)
int
__pthread_setaffinity_old (pthread_t th, cpu_set_t *cpuset)
{