summaryrefslogtreecommitdiff
path: root/arch/mips/kernel/linux32.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-02-17 00:21:29 +0300
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 22:30:35 +0400
commit54f2da755b7f0bf022ea204240cba824af4d80ad (patch)
tree06c6a800c1023cab23566f33fccb05d9f1de9e73 /arch/mips/kernel/linux32.c
parenta19050f301c55313826a649943d492c65f977479 (diff)
downloadlinux-54f2da755b7f0bf022ea204240cba824af4d80ad.tar.xz
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.c22
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)
return compat_sys_wait4(pid, stat_addr, options, NULL);
}
+asmlinkage long
+sysn32_waitid(int which, compat_pid_t pid,
+ siginfo_t __user *uinfo, int options,
+ struct compat_rusage __user *uru)
+{
+ struct rusage ru;
+ long ret;
+ mm_segment_t old_fs = get_fs();
+
+ set_fs (KERNEL_DS);
+ ret = sys_waitid(which, pid, uinfo, options,
+ uru ? (struct rusage __user *) &ru : NULL);
+ set_fs (old_fs);
+
+ if (ret < 0 || uinfo->si_signo == 0)
+ return ret;
+
+ if (uru)
+ ret = put_compat_rusage(&ru, uru);
+ return ret;
+}
+
struct sysinfo32 {
s32 uptime;
u32 loads[3];