public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Arun Sharma <arun.sharma@intel.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] IA-32: Support for new system call: waitid
Date: Wed, 06 Oct 2004 22:52:29 +0000	[thread overview]
Message-ID: <4164772D.3080904@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 112 bytes --]

Hi Tony,

The attached patch adds support for the new system call waitid that was introduced recently.

	-Arun


[-- Attachment #2: ia32-waitid.patch --]
[-- Type: text/plain, Size: 2636 bytes --]

Added support for the new syscall sys_waitid()

Signed-off-by: Arun Sharma <arun.sharma@intel.com>

Index: linux-2.6-cvs/arch/ia64/ia32/ia32_entry.S
===================================================================
RCS file: /home/adsharma/disk2/cvs/linux-2.5/arch/ia64/ia32/ia32_entry.S,v
retrieving revision 1.37
diff -u -r1.37 ia32_entry.S
--- linux-2.6-cvs/arch/ia64/ia32/ia32_entry.S	24 Aug 2004 18:27:07 -0000	1.37
+++ linux-2.6-cvs/arch/ia64/ia32/ia32_entry.S	21 Sep 2004 18:08:20 -0000
@@ -493,6 +493,8 @@
   	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: linux-2.6-cvs/arch/ia64/ia32/sys_ia32.c
===================================================================
RCS file: /home/adsharma/disk2/cvs/linux-2.5/arch/ia64/ia32/sys_ia32.c,v
retrieving revision 1.71
diff -u -r1.71 sys_ia32.c
--- linux-2.6-cvs/arch/ia64/ia32/sys_ia32.c	12 Jul 2004 21:24:00 -0000	1.71
+++ linux-2.6-cvs/arch/ia64/ia32/sys_ia32.c	21 Sep 2004 18:07:54 -0000
@@ -2728,6 +2728,32 @@
 			       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: linux-2.6-cvs/include/asm-ia64/ia32.h
===================================================================
RCS file: /home/adsharma/disk2/cvs/linux-2.5/include/asm-ia64/ia32.h,v
retrieving revision 1.22
diff -u -r1.22 ia32.h
--- linux-2.6-cvs/include/asm-ia64/ia32.h	19 Jun 2004 14:49:02 -0000	1.22
+++ linux-2.6-cvs/include/asm-ia64/ia32.h	21 Sep 2004 17:55:43 -0000
@@ -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__

                 reply	other threads:[~2004-10-06 22:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4164772D.3080904@intel.com \
    --to=arun.sharma@intel.com \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox