aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Waychison <mikew@google.com>2011-06-18 23:30:32 -0700
committermaximilian attems <max@stro.at>2011-06-25 18:36:32 +0200
commitbb9c74f6957596500b790f5a0da499d63580bfb0 (patch)
tree10627d4f066ec903bd447464cd995152cf6c1dc2
parente8ff02d6b77baaa2a2fa9b7226e7084784c1e95c (diff)
downloadklibc-bb9c74f6957596500b790f5a0da499d63580bfb0.tar.gz
[klibc] syscalls: Add sched_setaffinity, sched_getaffinity syscalls
Add the sched_getaffinity and sched_setaffinity system calls. Google-Bug-Id: 4725830 Signed-off-by: Mike Waychison <mikew@google.com> Signed-off-by: maximilian attems <max@stro.at>
-rw-r--r--usr/include/sched.h2
-rw-r--r--usr/klibc/SYSCALLS.def2
2 files changed, 4 insertions, 0 deletions
diff --git a/usr/include/sched.h b/usr/include/sched.h
index fb4da8d90c719..713cc7aa8cdeb 100644
--- a/usr/include/sched.h
+++ b/usr/include/sched.h
@@ -18,6 +18,8 @@ struct sched_param {
};
__extern int sched_setscheduler(pid_t, int, const struct sched_param *);
+__extern int sched_setaffinity(pid_t, unsigned int, unsigned long *);
+__extern int sched_getaffinity(pid_t, unsigned int, unsigned long *);
__extern int sched_yield(void);
/* Raw interfaces to clone(2); only actually usable for non-VM-cloning */
diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def
index 437dfa790a1f3..9e1d34902977b 100644
--- a/usr/klibc/SYSCALLS.def
+++ b/usr/klibc/SYSCALLS.def
@@ -49,6 +49,8 @@ int execve(const char *, char * const *, char * const *);
int setpriority(int, int, int);
int getrusage(int, struct rusage *);
int sched_setscheduler(pid_t, int, const struct sched_param *);
+<?> int sched_setaffinity(pid_t, unsigned int, unsigned long *);
+<?> int sched_getaffinity(pid_t, unsigned int, unsigned long *);
int sched_yield();
<i386> int prctl@varadic(int, unsigned long, unsigned long, unsigned long, unsigned long);
<!i386> int prctl(int, unsigned long, unsigned long, unsigned long, unsigned long);