mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Linux: sched_getaffinity syscall number is always available
Due to the built-in tables, __NR_sched_getaffinity is always defined. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
@ -24,11 +24,10 @@
|
|||||||
#include <shlib-compat.h>
|
#include <shlib-compat.h>
|
||||||
|
|
||||||
|
|
||||||
#ifdef __NR_sched_getaffinity
|
#if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
|
||||||
# if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
|
|
||||||
extern int __sched_getaffinity_new (pid_t, size_t, cpu_set_t *);
|
extern int __sched_getaffinity_new (pid_t, size_t, cpu_set_t *);
|
||||||
libc_hidden_proto (__sched_getaffinity_new)
|
libc_hidden_proto (__sched_getaffinity_new)
|
||||||
# endif
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
__sched_getaffinity_new (pid_t pid, size_t cpusetsize, cpu_set_t *cpuset)
|
__sched_getaffinity_new (pid_t pid, size_t cpusetsize, cpu_set_t *cpuset)
|
||||||
@ -48,7 +47,7 @@ versioned_symbol (libc, __sched_getaffinity_new, sched_getaffinity,
|
|||||||
GLIBC_2_3_4);
|
GLIBC_2_3_4);
|
||||||
|
|
||||||
|
|
||||||
# if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
|
#if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
|
||||||
libc_hidden_def (__sched_getaffinity_new)
|
libc_hidden_def (__sched_getaffinity_new)
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -59,7 +58,4 @@ __sched_getaffinity_old (pid_t pid, cpu_set_t *cpuset)
|
|||||||
return __sched_getaffinity_new (pid, 128, cpuset);
|
return __sched_getaffinity_new (pid, 128, cpuset);
|
||||||
}
|
}
|
||||||
compat_symbol (libc, __sched_getaffinity_old, sched_getaffinity, GLIBC_2_3_3);
|
compat_symbol (libc, __sched_getaffinity_old, sched_getaffinity, GLIBC_2_3_3);
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# include <posix/sched_getaffinity.c>
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user