]> git.hungrycats.org Git - linux/commitdiff
[IA64] Added support for the new syscall sys_waitid()
authorArun Sharma <arun.sharma@intel.com>
Thu, 7 Oct 2004 06:00:53 +0000 (06:00 +0000)
committerTony Luck <aegl@agluck-lia64.sc.intel.com>
Thu, 7 Oct 2004 06:00:53 +0000 (06:00 +0000)
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/ia32/ia32_entry.S
arch/ia64/ia32/sys_ia32.c
include/asm-ia64/ia32.h

index d458c2e92413c0d1eb9a131baa738c48a782e58d..4a6319c6d03400e7ad6bffad986fa8b9dfc71d25 100644 (file)
@@ -493,6 +493,8 @@ ia32_syscall_table:
        data8 compat_sys_mq_timedreceive        /* 280 */
        data8 compat_sys_mq_notify
        data8 compat_sys_mq_getsetattr
+       data8 sys_ni_syscall            /* reserved for kexec */
+       data8 sys32_waitid
 
        // guard against failures to increase IA32_NR_syscalls
        .org ia32_syscall_table + 8*IA32_NR_syscalls
index 47d6bcfbaea5a23b9dea692043454442edebfc3d..1b653dadb1d915550ae2e04761b2ce5b9e35feda 100644 (file)
@@ -2661,6 +2661,32 @@ long sys32_fadvise64_64(int fd, __u32 offset_low, __u32 offset_high,
                               advice); 
 } 
 
+asmlinkage long sys32_waitid(int which, compat_pid_t pid,
+                            siginfo_t32 __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 ? &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);
+}
+
 #ifdef NOTYET  /* UNTESTED FOR IA64 FROM HERE DOWN */
 
 asmlinkage long sys32_setreuid(compat_uid_t ruid, compat_uid_t euid)
index c51efbd67faf73ee21e6e2b4951ac648944abe6f..8e746b2413a64fa27a76638180aa6b33cc172263 100644 (file)
@@ -6,7 +6,7 @@
 #include <asm/ptrace.h>
 #include <asm/signal.h>
 
-#define IA32_NR_syscalls               283     /* length of syscall table */
+#define IA32_NR_syscalls               285     /* length of syscall table */
 #define IA32_PAGE_SHIFT                        12      /* 4KB pages */
 
 #ifndef __ASSEMBLY__