dfd5bc9d1f5a0de556f7ab94c615e62e917cf6f7
[openwrt.git] / toolchain / uClibc / patches / 002-conditional_sched_affinity.patch
1 --- a/libc/sysdeps/linux/common/sched_getaffinity.c
2 +++ b/libc/sysdeps/linux/common/sched_getaffinity.c
3 @@ -29,6 +29,7 @@
4 #include <sys/param.h>
5 #include <sys/types.h>
6
7 +#ifdef __NR_sched_getaffinity
8 libc_hidden_proto(memset)
9
10 #define __NR___syscall_sched_getaffinity __NR_sched_getaffinity
11 @@ -48,5 +49,15 @@ int sched_getaffinity(pid_t pid, size_t
12 }
13 return res;
14 }
15 +#else
16 +/*
17 +int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *cpuset)
18 +{
19 + __set_errno(ENOSYS);
20 + return -1;
21 +}
22 +*/
23 #endif
24 #endif
25 +
26 +#endif
27 --- a/libc/sysdeps/linux/common/sched_setaffinity.c
28 +++ b/libc/sysdeps/linux/common/sched_setaffinity.c
29 @@ -31,6 +31,7 @@
30 #include <sys/types.h>
31 #include <alloca.h>
32
33 +#ifdef __NR_sched_setaffinity
34 libc_hidden_proto(getpid)
35
36 #define __NR___syscall_sched_setaffinity __NR_sched_setaffinity
37 @@ -74,5 +75,14 @@ int sched_setaffinity(pid_t pid, size_t
38
39 return INLINE_SYSCALL (sched_setaffinity, 3, pid, cpusetsize, cpuset);
40 }
41 +#else
42 +/*
43 +int sched_setaffinity(pid_t pid, size_t cpusetsize, const cpu_set_t *cpuset)
44 +{
45 + __set_errno(ENOSYS);
46 + return -1;
47 +}
48 +*/
49 +#endif
50 #endif
51 #endif
This page took 0.051517 seconds and 3 git commands to generate.