From 87be6cadfcd87d9484f439c4002b9537656c4929 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 16 Apr 2011 02:06:39 +0200 Subject: sched_getaffinity.c: mark syscall as __always_inline Reorganize a bit. Signed-off-by: Peter S. Mazinger Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/common/sched_getaffinity.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'libc') diff --git a/libc/sysdeps/linux/common/sched_getaffinity.c b/libc/sysdeps/linux/common/sched_getaffinity.c index 8982582cc..08545161a 100644 --- a/libc/sysdeps/linux/common/sched_getaffinity.c +++ b/libc/sysdeps/linux/common/sched_getaffinity.c @@ -16,20 +16,16 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include -#ifdef __USE_GNU - -#include -#include #include -#include -#include - -#if defined __NR_sched_getaffinity -#define __NR___syscall_sched_getaffinity __NR_sched_getaffinity -static __inline__ _syscall3(int, __syscall_sched_getaffinity, __kernel_pid_t, pid, - size_t, cpusetsize, cpu_set_t *, cpuset) +#if defined __NR_sched_getaffinity && defined __USE_GNU +# include +# include +# include +# include +# define __NR___syscall_sched_getaffinity __NR_sched_getaffinity +static __always_inline _syscall3(int, __syscall_sched_getaffinity, __kernel_pid_t, pid, + size_t, cpusetsize, cpu_set_t *, cpuset) int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *cpuset) { @@ -45,4 +41,3 @@ int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *cpuset) return res; } #endif -#endif -- cgit v1.2.3