aboutsummaryrefslogtreecommitdiff
path: root/nptl/pthread_attr_setaffinity.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/pthread_attr_setaffinity.c')
-rw-r--r--nptl/pthread_attr_setaffinity.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/nptl/pthread_attr_setaffinity.c b/nptl/pthread_attr_setaffinity.c
index cbdee85343..a42ffd92f4 100644
--- a/nptl/pthread_attr_setaffinity.c
+++ b/nptl/pthread_attr_setaffinity.c
@@ -25,8 +25,8 @@
int
-__pthread_attr_setaffinity_new (pthread_attr_t *attr, size_t cpusetsize,
- const cpu_set_t *cpuset)
+__pthread_attr_setaffinity_np (pthread_attr_t *attr, size_t cpusetsize,
+ const cpu_set_t *cpuset)
{
struct pthread_attr *iattr;
@@ -55,17 +55,25 @@ __pthread_attr_setaffinity_new (pthread_attr_t *attr, size_t cpusetsize,
return 0;
}
-versioned_symbol (libpthread, __pthread_attr_setaffinity_new,
- pthread_attr_setaffinity_np, GLIBC_2_3_4);
+libc_hidden_def (__pthread_attr_setaffinity_np)
+versioned_symbol (libc, __pthread_attr_setaffinity_np,
+ pthread_attr_setaffinity_np, GLIBC_2_32);
-#if SHLIB_COMPAT (libpthread, GLIBC_2_3_3, GLIBC_2_3_4)
+#if SHLIB_COMPAT (libc, GLIBC_2_3_4, GLIBC_2_32)
+/* Compat symbol with the old libc version. */
+strong_alias (__pthread_attr_setaffinity_np, __pthread_attr_setaffinity_alias)
+compat_symbol (libc, __pthread_attr_setaffinity_alias,
+ pthread_attr_setaffinity_np, GLIBC_2_3_4);
+#endif
+
+#if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
int
__pthread_attr_setaffinity_old (pthread_attr_t *attr, cpu_set_t *cpuset)
{
/* The old interface by default assumed a 1024 processor bitmap. */
- return __pthread_attr_setaffinity_new (attr, 128, cpuset);
+ return __pthread_attr_setaffinity_np (attr, 128, cpuset);
}
-compat_symbol (libpthread, __pthread_attr_setaffinity_old,
+compat_symbol (libc, __pthread_attr_setaffinity_old,
pthread_attr_setaffinity_np, GLIBC_2_3_3);
#endif