aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@codesourcery.com>2007-01-25 13:08:14 +0000
committerDaniel Jacobowitz <dan@codesourcery.com>2007-01-25 13:08:14 +0000
commiteb96755bb858e8a0db32f7ce360f21d902e4c306 (patch)
tree40ea73086925eda7e911827ec15dee9442ab982d
parent908afa831ca4403a689304a86e2014b4baa66366 (diff)
downloadglibc-eb96755bb858e8a0db32f7ce360f21d902e4c306.tar.xz
glibc-eb96755bb858e8a0db32f7ce360f21d902e4c306.zip
* sysdeps/unix/sysv/linux/mips/mips64/syscalls.list: Remove msgctl,
shmctl, and semctl. * sysdeps/unix/sysv/linux/mips/misp64/semctl.c, sysdeps/unix/sysv/linux/mips/mips64/shmctl.c, sysdeps/unix/sysv/linux/mips/mips64/msgctl.c: New files.
-rw-r--r--ChangeLog.mips9
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/msgctl.c35
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/semctl.c57
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/shmctl.c35
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/syscalls.list6
5 files changed, 138 insertions, 4 deletions
diff --git a/ChangeLog.mips b/ChangeLog.mips
index 7ee5bfd9a7..6bf3313f92 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,3 +1,12 @@
+2007-01-25 Atsushi Nemoto <anemo@mba.ocn.ne.jp>
+ Daniel Jacobowitz <dan@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/mips64/syscalls.list: Remove msgctl,
+ shmctl, and semctl.
+ * sysdeps/unix/sysv/linux/mips/misp64/semctl.c,
+ sysdeps/unix/sysv/linux/mips/mips64/shmctl.c,
+ sysdeps/unix/sysv/linux/mips/mips64/msgctl.c: New files.
+
2007-01-23 Daniel Jacobowitz <dan@codesourcery.com>
* sysdeps/unix/sysv/linux/mips/mips32/sysdep.h (PTR_MANGLE,
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/msgctl.c b/sysdeps/unix/sysv/linux/mips/mips64/msgctl.c
new file mode 100644
index 0000000000..646c348428
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/msgctl.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <sys/msg.h>
+#include <ipc_priv.h>
+#include <sysdep.h>
+
+#include <bp-checks.h>
+
+int __msgctl (int msqid, int cmd, struct msqid_ds *buf);
+
+int
+__msgctl (int msqid, int cmd, struct msqid_ds *buf)
+{
+ return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, CHECK_1 (buf));
+}
+
+#include <shlib-compat.h>
+versioned_symbol (libc, __msgctl, msgctl, GLIBC_2_0);
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/semctl.c b/sysdeps/unix/sysv/linux/mips/mips64/semctl.c
new file mode 100644
index 0000000000..4d38b386de
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/semctl.c
@@ -0,0 +1,57 @@
+/* Copyright (C) 2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <stdarg.h>
+#include <sys/sem.h>
+#include <ipc_priv.h>
+#include <sysdep.h>
+
+/* Define a `union semun' suitable for Linux here. */
+union semun
+{
+ int val; /* value for SETVAL */
+ struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */
+ unsigned short int *array; /* array for GETALL & SETALL */
+ struct seminfo *__buf; /* buffer for IPC_INFO */
+};
+
+#include <bp-checks.h>
+#include <bp-semctl.h> /* definition of CHECK_SEMCTL needs union semum */
+
+int __semctl (int semid, int semnum, int cmd, ...);
+
+int
+__semctl (int semid, int semnum, int cmd, ...)
+{
+ union semun arg;
+ va_list ap;
+
+ va_start (ap, cmd);
+
+ /* Get the argument. */
+ arg = va_arg (ap, union semun);
+
+ va_end (ap);
+
+ return INLINE_SYSCALL (semctl, 4, semid, semnum, cmd | __IPC_64,
+ CHECK_SEMCTL (&arg, semid, cmd | __IPC_64)->array);
+}
+
+#include <shlib-compat.h>
+versioned_symbol (libc, __semctl, semctl, GLIBC_2_0);
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/shmctl.c b/sysdeps/unix/sysv/linux/mips/mips64/shmctl.c
new file mode 100644
index 0000000000..7e5150be84
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/shmctl.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <sys/shm.h>
+#include <ipc_priv.h>
+#include <sysdep.h>
+
+#include <bp-checks.h>
+
+int __shmctl (int shmid, int cmd, struct shmid_ds *buf);
+
+int
+__shmctl (int shmid, int cmd, struct shmid_ds *buf)
+{
+ return INLINE_SYSCALL (shmctl, 3, shmid, cmd | __IPC_64, CHECK_1 (buf));
+}
+
+#include <shlib-compat.h>
+versioned_symbol (libc, __shmctl, shmctl, GLIBC_2_0);
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
index 0d1657d9fc..cac273cc90 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
@@ -2,16 +2,14 @@
lseek - lseek Ci:iii __libc_lseek __lseek lseek __llseek llseek __libc_lseek64 __lseek64 lseek64
-# semaphore and shm system calls
-msgctl - msgctl i:iip __msgctl msgctl
+# Semaphore and shm system calls. msgctl, shmctl, and semctl have C
+# wrappers (to set __IPC_64).
msgget - msgget i:ii __msgget msgget
msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv
msgsnd - msgsnd Ci:ibni __msgsnd msgsnd
shmat - shmat i:ipi __shmat shmat
-shmctl - shmctl i:iip __shmctl shmctl
shmdt - shmdt i:s __shmdt shmdt
shmget - shmget i:iii __shmget shmget
semop - semop i:ipi __semop semop
semtimedop - semtimedop i:ipip semtimedop
semget - semget i:iii __semget semget
-semctl - semctl i:iiii __semctl semctl