summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2004-09-13 00:05:18 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-09-13 00:05:18 -0700
commit2d3399ab54c9763fcba314d0b33ab82e1580d7aa (patch)
treeca03be5ae2aa85daed645aa65bf4d402b0ff51f4 /include/linux
parentb48e213e8d730e898cf0b3945ecaf21185f27fee (diff)
[PATCH] Clean up compat sched affinity syscalls
Remove the set_fs hack in the compat affinity calls. Create sched_getaffinity and sched_setaffinity helper functions that both the native and compat affinity syscalls use. Also make the compat functions match what the native ones are doing now, setaffinity calls succeed no matter what length the bitmask is, but getaffinity calls must pass in bitmasks at least as long as the kernel type. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sched.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index b73710a9ac12..f5d4b9cae523 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1024,6 +1024,9 @@ static inline void arch_pick_mmap_layout(struct mm_struct *mm)
}
#endif
+extern long sched_setaffinity(pid_t pid, cpumask_t new_mask);
+extern long sched_getaffinity(pid_t pid, cpumask_t *mask);
+
#endif /* __KERNEL__ */
#endif