From 2d3399ab54c9763fcba314d0b33ab82e1580d7aa Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Mon, 13 Sep 2004 00:05:18 -0700 Subject: [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 Signed-off-by: Linus Torvalds --- include/linux/sched.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') 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 -- cgit v1.2.3