Mike Waychison
2011-Jun-19 06:30 UTC
[klibc] [PATCH] 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 at google.com>
---
usr/include/sched.h | 2 ++
usr/klibc/SYSCALLS.def | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
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 @@ 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 437dfa7..9e1d349 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 at varadic(int, unsigned long, unsigned long, unsigned
long, unsigned long);
<!i386> int prctl(int, unsigned long, unsigned long, unsigned long,
unsigned long);
--
1.7.3.1
maximilian attems
2011-Jun-25 17:11 UTC
[klibc] [PATCH] syscalls: Add sched_setaffinity, sched_getaffinity syscalls
On Sat, 18 Jun 2011, Mike Waychison wrote:> Add the sched_getaffinity and sched_setaffinity system calls.applied and pushed, thank you.> Google-Bug-Id: 4725830is there a public view of that? -- maks
Maciej Żenczykowski
2011-Jun-25 17:28 UTC
[klibc] [PATCH] syscalls: Add sched_setaffinity, sched_getaffinity syscalls
>> Google-Bug-Id: 4725830 > > is there a public view of that?No, sorry, internal only, feel free to strip and apply without the comment. (although I know there are commits in the upstream linux kernel that include such internal tracking metadata). Thanks, Maciej
Mike Waychison
2011-Jun-27 01:35 UTC
[klibc] [PATCH] syscalls: Add sched_setaffinity, sched_getaffinity syscalls
On Sat, Jun 25, 2011 at 10:11 AM, maximilian attems <max at stro.at> wrote:> On Sat, 18 Jun 2011, Mike Waychison wrote: > >> Add the sched_getaffinity and sched_setaffinity system calls. > > applied and pushed, thank you. > > >> Google-Bug-Id: 4725830 > > is there a public view of that?Unfortunately, no. As maze points out, these are internal to Google. Having them present does help us track things internally though.> > -- > maks >