aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/sched_getaffinity.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-08-21 09:57:15 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-08-21 09:57:15 -0700
commite5dee2c896f04d88defdfa00282fa83f5f4004d8 (patch)
treecaebcffacffc0363dc418694eba18b2ce6b8617b /sysdeps/unix/sysv/linux/sched_getaffinity.c
parent8c7c251746ce41779637c83e3b35639517f728d5 (diff)
downloadglibc-e5dee2c896f04d88defdfa00282fa83f5f4004d8.tar
glibc-e5dee2c896f04d88defdfa00282fa83f5f4004d8.tar.gz
glibc-e5dee2c896f04d88defdfa00282fa83f5f4004d8.tar.bz2
glibc-e5dee2c896f04d88defdfa00282fa83f5f4004d8.zip
Revert "Add INLINE_SYSCALL_RETURN/INLINE_SYSCALL_ERROR_RETURN"
This reverts commit 0c5b8b5941e036dcaac69cecee9f01fdf9218e6e.
Diffstat (limited to 'sysdeps/unix/sysv/linux/sched_getaffinity.c')
-rw-r--r--sysdeps/unix/sysv/linux/sched_getaffinity.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/sysdeps/unix/sysv/linux/sched_getaffinity.c b/sysdeps/unix/sysv/linux/sched_getaffinity.c
index d66b6faa55..9850806298 100644
--- a/sysdeps/unix/sysv/linux/sched_getaffinity.c
+++ b/sysdeps/unix/sysv/linux/sched_getaffinity.c
@@ -25,22 +25,12 @@
#ifdef __NR_sched_getaffinity
-# if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
-extern int __sched_getaffinity_new (pid_t, size_t, cpu_set_t *);
-libc_hidden_proto (__sched_getaffinity_new)
-# endif
-
int
__sched_getaffinity_new (pid_t pid, size_t cpusetsize, cpu_set_t *cpuset)
{
- INTERNAL_SYSCALL_DECL (err);
- int res = INTERNAL_SYSCALL (sched_getaffinity, err, 3, pid,
- MIN (INT_MAX, cpusetsize), cpuset);
- if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (res, err)))
- return INLINE_SYSCALL_ERROR_RETURN (-INTERNAL_SYSCALL_ERRNO (res,
- err),
- int, -1);
- else
+ int res = INLINE_SYSCALL (sched_getaffinity, 3, pid,
+ MIN (INT_MAX, cpusetsize), cpuset);
+ if (res != -1)
{
/* Clean the rest of the memory the kernel didn't do. */
memset ((char *) cpuset + res, '\0', cpusetsize - res);
@@ -54,8 +44,6 @@ versioned_symbol (libc, __sched_getaffinity_new, sched_getaffinity,
# if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
-libc_hidden_def (__sched_getaffinity_new)
-
int
attribute_compat_text_section
__sched_getaffinity_old (pid_t pid, cpu_set_t *cpuset)