diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-02-16 16:21:29 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2005-10-29 14:30:35 -0400 |
commit | 54f2da755b7f0bf022ea204240cba824af4d80ad (patch) | |
tree | 06c6a800c1023cab23566f33fccb05d9f1de9e73 /arch/mips/kernel/linux32.c | |
parent | a19050f301c55313826a649943d492c65f977479 (diff) |
Implement 32-bit compatibility for waitid(2).
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/linux32.c')
-rw-r--r-- | arch/mips/kernel/linux32.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index dfb448c015e1..120dd897162e 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
@@ -221,6 +221,28 @@ sys32_waitpid(compat_pid_t pid, unsigned int *stat_addr, int options) | |||
221 | return compat_sys_wait4(pid, stat_addr, options, NULL); | 221 | return compat_sys_wait4(pid, stat_addr, options, NULL); |
222 | } | 222 | } |
223 | 223 | ||
224 | asmlinkage long | ||
225 | sysn32_waitid(int which, compat_pid_t pid, | ||
226 | siginfo_t __user *uinfo, int options, | ||
227 | struct compat_rusage __user *uru) | ||
228 | { | ||
229 | struct rusage ru; | ||
230 | long ret; | ||
231 | mm_segment_t old_fs = get_fs(); | ||
232 | |||
233 | set_fs (KERNEL_DS); | ||
234 | ret = sys_waitid(which, pid, uinfo, options, | ||
235 | uru ? (struct rusage __user *) &ru : NULL); | ||
236 | set_fs (old_fs); | ||
237 | |||
238 | if (ret < 0 || uinfo->si_signo == 0) | ||
239 | return ret; | ||
240 | |||
241 | if (uru) | ||
242 | ret = put_compat_rusage(&ru, uru); | ||
243 | return ret; | ||
244 | } | ||
245 | |||
224 | struct sysinfo32 { | 246 | struct sysinfo32 { |
225 | s32 uptime; | 247 | s32 uptime; |
226 | u32 loads[3]; | 248 | u32 loads[3]; |