Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@baldric.uwo.ca>
To: parisc-linux@lists.parisc-linux.org
Subject: [parisc-linux] compat code for semtimedop in 2.4?
Date: Tue, 8 Jul 2003 10:23:25 -0400	[thread overview]
Message-ID: <20030708142325.GA21709@systemhalted> (raw)

malcontents,

Checking the dirtiness of my 2.4 tree has reminded that we need some
sort of compat for semtimedop? Since we don't have an IPC multiplexor
this function call from the glibc side (already written wrapper) calls
this syscall. The number was given out by willy, and matches the 2.5
number. Do we need compat code? *Sigh*

Comments welcome!

Cheers,
Carlos.

---

Index: arch/parisc/kernel/sys_parisc.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/sys_parisc.c,v
retrieving revision 1.14
diff -u -p -r1.14 sys_parisc.c
--- arch/parisc/kernel/sys_parisc.c	23 Nov 2001 21:54:28 -0000	1.14
+++ arch/parisc/kernel/sys_parisc.c	8 Jul 2003 14:17:36 -0000
@@ -256,3 +256,11 @@ int sys_shmctl_broken(int shmid, int cmd
 	return sys_shmctl (shmid, cmd, (struct shmid_ds *)buf);
 }
 
+/* 2.4 compat code required for IPC calls */
+asmlinkage long sys_semtimedop(int semid, struct sembuf *tsops,
+                                unsigned nsops, const struct timespec *timeout)
+{
+	/* FIXME: Need to implement compat? */
+	return -ENOSYS;
+}
+
Index: arch/parisc/kernel/sys_parisc32.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/sys_parisc32.c,v
retrieving revision 1.27
diff -u -p -r1.27 sys_parisc32.c
--- arch/parisc/kernel/sys_parisc32.c	14 Sep 2002 05:14:03 -0000	1.27
+++ arch/parisc/kernel/sys_parisc32.c	8 Jul 2003 14:17:36 -0000
@@ -3104,3 +3104,11 @@ asmlinkage long sys32_semctl_broken(int 
 	return sys_semctl (semid, semnum, cmd, arg);
 }
 
+/* 2.4 compat code required for IPC calls */
+asmlinkage long sys32_semtimedop(int semid, struct sembuf *tsops,
+				unsigned nsops, const struct timespec *timeout)
+{
+	/* FIXME: Possible 32/64 conversions required */
+	/* FIXME: Need to implement compat? */
+	return -ENOSYS;
+}
Index: arch/parisc/kernel/syscall.S
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/syscall.S,v
retrieving revision 1.78
diff -u -p -r1.78 syscall.S
--- arch/parisc/kernel/syscall.S	4 Aug 2002 22:57:47 -0000	1.78
+++ arch/parisc/kernel/syscall.S	8 Jul 2003 14:17:36 -0000
@@ -604,8 +604,31 @@ sys_call_table:
 #endif
 	ENTRY_SAME(gettid)             
 	ENTRY_SAME(readahead)          
-	ENTRY_SAME(tkill)
+	ENTRY_SAME(tkill)		/* 208 */
 
+	/* COMPAT semtimedop call requires the same syscall number
+	across kernel versions. */
+	
+	ENTRY_SAME(ni_syscall)
+	ENTRY_SAME(ni_syscall)		/* 210 */
+	ENTRY_SAME(ni_syscall)
+	ENTRY_SAME(ni_syscall)
+	ENTRY_SAME(ni_syscall)
+	ENTRY_SAME(ni_syscall)
+	ENTRY_SAME(ni_syscall)
+	ENTRY_SAME(ni_syscall)
+	ENTRY_SAME(ni_syscall)
+	ENTRY_SAME(ni_syscall)
+	ENTRY_SAME(ni_syscall)
+	ENTRY_SAME(ni_syscall)		/* 220 */
+	ENTRY_SAME(ni_syscall)
+	ENTRY_SAME(ni_syscall)
+	ENTRY_SAME(ni_syscall)
+	ENTRY_SAME(ni_syscall)
+	ENTRY_SAME(ni_syscall)
+	ENTRY_SAME(ni_syscall)
+	ENTRY_SAME(ni_syscall)
+	ENTRY_DIFF(semtimedop)		/* 228 */
 .end
 
 	/* Make sure nothing else is placed on this page */
Index: include/asm-parisc/unistd.h
===================================================================
RCS file: /var/cvs/linux/include/asm-parisc/unistd.h,v
retrieving revision 1.26
diff -u -p -r1.26 unistd.h
--- include/asm-parisc/unistd.h	4 Aug 2002 22:59:52 -0000	1.26
+++ include/asm-parisc/unistd.h	8 Jul 2003 14:17:39 -0000
@@ -702,6 +702,8 @@
 #define __NR_readahead          (__NR_Linux + 207)
 #define __NR_tkill              (__NR_Linux + 208)
 
+#define __NR_semtimedop         (__NR_Linux + 228)
+
 #define __NR_Linux_syscalls     208
 
 #define HPUX_GATEWAY_ADDR       0xC0000004

                 reply	other threads:[~2003-07-08 14:24 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=20030708142325.GA21709@systemhalted \
    --to=carlos@baldric.uwo.ca \
    --cc=parisc-linux@lists.parisc-linux.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