diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2011-04-16 02:06:39 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2012-06-15 14:00:38 +0200 |
commit | 87be6cadfcd87d9484f439c4002b9537656c4929 (patch) | |
tree | be47eb9ad61f2c52ea8d68b8e5f7a68a5ccdebf3 | |
parent | 29ba11d6053fe1267d00190c278e717b7d0a2fad (diff) |
sched_getaffinity.c: mark syscall as __always_inline
Reorganize a bit.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
-rw-r--r-- | libc/sysdeps/linux/common/sched_getaffinity.c | 21 |
1 files changed, 8 insertions, 13 deletions
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 <features.h> -#ifdef __USE_GNU - -#include <sched.h> -#include <sys/types.h> #include <sys/syscall.h> -#include <string.h> -#include <sys/param.h> - -#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 <sched.h> +# include <string.h> +# include <sys/types.h> +# include <sys/param.h> +# 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 |