Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11000
b: refs/heads/master
c: 54f2da7
h: refs/heads/master
v: v3
  • Loading branch information
Ralf Baechle committed Oct 29, 2005
1 parent d04440c commit 899db9a
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a19050f301c55313826a649943d492c65f977479
refs/heads/master: 54f2da755b7f0bf022ea204240cba824af4d80ad
22 changes: 22 additions & 0 deletions trunk/arch/mips/kernel/linux32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/kernel/scall64-n32.S
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ EXPORT(sysn32_call_table)
PTR compat_sys_mq_notify
PTR compat_sys_mq_getsetattr
PTR sys_ni_syscall /* 6240, sys_vserver */
PTR sys_waitid
PTR sysn32_waitid
PTR sys_ni_syscall /* available, was setaltroot */
PTR sys_add_key
PTR sys_request_key
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/mips/kernel/scall64-o32.S
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ sys_call_table:
PTR compat_sys_mq_notify /* 4275 */
PTR compat_sys_mq_getsetattr
PTR sys_ni_syscall /* sys_vserver */
PTR sys_waitid
PTR sys32_waitid
PTR sys_ni_syscall /* available, was setaltroot */
PTR sys_add_key /* 4280 */
PTR sys_request_key
Expand Down
27 changes: 27 additions & 0 deletions trunk/arch/mips/kernel/signal32.c
Original file line number Diff line number Diff line change
Expand Up @@ -902,3 +902,30 @@ asmlinkage int sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t *uinfo)
set_fs (old_fs);
return ret;
}

asmlinkage long
sys32_waitid(int which, compat_pid_t pid,
compat_siginfo_t __user *uinfo, int options,
struct compat_rusage __user *uru)
{
siginfo_t info;
struct rusage ru;
long ret;
mm_segment_t old_fs = get_fs();

info.si_signo = 0;
set_fs (KERNEL_DS);
ret = sys_waitid(which, pid, (siginfo_t __user *) &info, options,
uru ? (struct rusage __user *) &ru : NULL);
set_fs (old_fs);

if (ret < 0 || info.si_signo == 0)
return ret;

if (uru && (ret = put_compat_rusage(&ru, uru)))
return ret;

BUG_ON(info.si_code & __SI_MASK);
info.si_code |= __SI_CHLD;
return copy_siginfo_to_user32(uinfo, &info);
}

0 comments on commit 899db9a

Please sign in to comment.