[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>
diff --git a/usr/include/sched.h b/usr/include/sched.h
index fb4da8d..713cc7a 100644
--- a/usr/include/sched.h
+++ b/usr/include/sched.h
@@ -18,6 +18,8 @@
 };
 
 __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 437dfa7..9e1d349 100644
--- a/usr/klibc/SYSCALLS.def
+++ b/usr/klibc/SYSCALLS.def
@@ -49,6 +49,8 @@
 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);