Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc Add special treatment of shmat(2).



details:   https://anonhg.NetBSD.org/src/rev/ed64ac67285b
branches:  trunk
changeset: 494499:ed64ac67285b
user:      itohy <itohy%NetBSD.org@localhost>
date:      Fri Jul 07 08:20:50 2000 +0000

description:
Add special treatment of shmat(2).
On m68k ELF calling standard (__SVR4_ABI__), if a function
returns a pointer, the return value should go to a0 as well as d0.

diffstat:

 lib/libc/arch/alpha/sys/shmat.S   |   5 ++++
 lib/libc/arch/arm26/sys/shmat.S   |   5 ++++
 lib/libc/arch/arm32/sys/shmat.S   |   5 ++++
 lib/libc/arch/i386/sys/shmat.S    |   5 ++++
 lib/libc/arch/m68k/sys/shmat.S    |  42 +++++++++++++++++++++++++++++++++++++++
 lib/libc/arch/mips/sys/shmat.S    |   5 ++++
 lib/libc/arch/ns32k/sys/shmat.S   |   5 ++++
 lib/libc/arch/powerpc/sys/shmat.S |   5 ++++
 lib/libc/arch/sh3/sys/shmat.S     |   5 ++++
 lib/libc/arch/sparc/sys/shmat.S   |   5 ++++
 lib/libc/arch/sparc64/sys/shmat.S |   5 ++++
 lib/libc/arch/vax/sys/shmat.S     |   5 ++++
 lib/libc/sys/Makefile.inc         |   9 ++++---
 13 files changed, 102 insertions(+), 4 deletions(-)

diffs (175 lines):

diff -r abd21ca68c52 -r ed64ac67285b lib/libc/arch/alpha/sys/shmat.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/alpha/sys/shmat.S   Fri Jul 07 08:20:50 2000 +0000
@@ -0,0 +1,5 @@
+/*     $NetBSD: shmat.S,v 1.1 2000/07/07 08:20:51 itohy Exp $  */
+
+#include "SYS.h"
+
+RSYSCALL(shmat)
diff -r abd21ca68c52 -r ed64ac67285b lib/libc/arch/arm26/sys/shmat.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/arm26/sys/shmat.S   Fri Jul 07 08:20:50 2000 +0000
@@ -0,0 +1,5 @@
+/*     $NetBSD: shmat.S,v 1.1 2000/07/07 08:20:51 itohy Exp $  */
+
+#include "SYS.h"
+
+RSYSCALL(shmat)
diff -r abd21ca68c52 -r ed64ac67285b lib/libc/arch/arm32/sys/shmat.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/arm32/sys/shmat.S   Fri Jul 07 08:20:50 2000 +0000
@@ -0,0 +1,5 @@
+/*     $NetBSD: shmat.S,v 1.1 2000/07/07 08:20:51 itohy Exp $  */
+
+#include "SYS.h"
+
+RSYSCALL(shmat)
diff -r abd21ca68c52 -r ed64ac67285b lib/libc/arch/i386/sys/shmat.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/i386/sys/shmat.S    Fri Jul 07 08:20:50 2000 +0000
@@ -0,0 +1,5 @@
+/*     $NetBSD: shmat.S,v 1.1 2000/07/07 08:20:52 itohy Exp $  */
+
+#include "SYS.h"
+
+RSYSCALL(shmat)
diff -r abd21ca68c52 -r ed64ac67285b lib/libc/arch/m68k/sys/shmat.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/m68k/sys/shmat.S    Fri Jul 07 08:20:50 2000 +0000
@@ -0,0 +1,42 @@
+/*     $NetBSD: shmat.S,v 1.1 2000/07/07 08:20:52 itohy Exp $  */
+
+/*-
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *     This product includes software developed by the NetBSD
+ *     Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ *    contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "SYS.h"
+
+SYSCALL(shmat)
+#ifdef __SVR4_ABI__
+       movl    %d0,%a0
+#endif
+       rts
diff -r abd21ca68c52 -r ed64ac67285b lib/libc/arch/mips/sys/shmat.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/mips/sys/shmat.S    Fri Jul 07 08:20:50 2000 +0000
@@ -0,0 +1,5 @@
+/*     $NetBSD: shmat.S,v 1.1 2000/07/07 08:20:52 itohy Exp $  */
+
+#include "SYS.h"
+
+RSYSCALL(shmat)
diff -r abd21ca68c52 -r ed64ac67285b lib/libc/arch/ns32k/sys/shmat.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/ns32k/sys/shmat.S   Fri Jul 07 08:20:50 2000 +0000
@@ -0,0 +1,5 @@
+/*     $NetBSD: shmat.S,v 1.1 2000/07/07 08:20:53 itohy Exp $  */
+
+#include "SYS.h"
+
+RSYSCALL(shmat)
diff -r abd21ca68c52 -r ed64ac67285b lib/libc/arch/powerpc/sys/shmat.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/powerpc/sys/shmat.S Fri Jul 07 08:20:50 2000 +0000
@@ -0,0 +1,5 @@
+/*     $NetBSD: shmat.S,v 1.1 2000/07/07 08:20:53 itohy Exp $  */
+
+#include "SYS.h"
+
+RSYSCALL(shmat)
diff -r abd21ca68c52 -r ed64ac67285b lib/libc/arch/sh3/sys/shmat.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/sh3/sys/shmat.S     Fri Jul 07 08:20:50 2000 +0000
@@ -0,0 +1,5 @@
+/*     $NetBSD: shmat.S,v 1.1 2000/07/07 08:20:54 itohy Exp $  */
+
+#include "SYS.h"
+
+RSYSCALL(shmat)
diff -r abd21ca68c52 -r ed64ac67285b lib/libc/arch/sparc/sys/shmat.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/sparc/sys/shmat.S   Fri Jul 07 08:20:50 2000 +0000
@@ -0,0 +1,5 @@
+/*     $NetBSD: shmat.S,v 1.1 2000/07/07 08:20:54 itohy Exp $  */
+
+#include "SYS.h"
+
+RSYSCALL(shmat)
diff -r abd21ca68c52 -r ed64ac67285b lib/libc/arch/sparc64/sys/shmat.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/sparc64/sys/shmat.S Fri Jul 07 08:20:50 2000 +0000
@@ -0,0 +1,5 @@
+/*     $NetBSD: shmat.S,v 1.1 2000/07/07 08:20:55 itohy Exp $  */
+
+#include "SYS.h"
+
+RSYSCALL(shmat)
diff -r abd21ca68c52 -r ed64ac67285b lib/libc/arch/vax/sys/shmat.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libc/arch/vax/sys/shmat.S     Fri Jul 07 08:20:50 2000 +0000
@@ -0,0 +1,5 @@
+/*     $NetBSD: shmat.S,v 1.1 2000/07/07 08:20:55 itohy Exp $  */
+
+#include "SYS.h"
+
+RSYSCALL(shmat)
diff -r abd21ca68c52 -r ed64ac67285b lib/libc/sys/Makefile.inc
--- a/lib/libc/sys/Makefile.inc Fri Jul 07 08:03:36 2000 +0000
+++ b/lib/libc/sys/Makefile.inc Fri Jul 07 08:20:50 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.104 2000/06/26 06:33:05 kleink Exp $
+#      $NetBSD: Makefile.inc,v 1.105 2000/07/07 08:20:50 itohy Exp $
 #      @(#)Makefile.inc        8.3 (Berkeley) 10/24/94
 
 # sys sources
@@ -6,8 +6,9 @@
 
 # modules with non-default implementations on at least one architecture:
 SRCS+= Ovfork.S __vfork14.S brk.S exect.S fork.S msgctl.S pipe.S ptrace.S \
-       sbrk.S __semctl.S setlogin.S shmctl.S sigaction.S sigpending.S \
-       sigprocmask.S sigreturn.S __sigreturn14.S sigsuspend.S syscall.S
+       sbrk.S __semctl.S setlogin.S shmat.S shmctl.S sigaction.S \
+       sigpending.S sigprocmask.S sigreturn.S __sigreturn14.S sigsuspend.S \
+       syscall.S
 SRCS+= cerror.S
 
 LSRCS+=        Lint_Ovfork.c Lint___vfork14.c Lint_brk.c Lint_exect.c Lint_fork.c \
@@ -60,7 +61,7 @@
        rmdir.o select.o semconfig.o semget.o semop.o ____semctl13.o sendmsg.o \
        sendto.o setegid.o seteuid.o setgid.o setgroups.o setitimer.o \
        setpgid.o setpriority.o setregid.o setreuid.o setrlimit.o \
-       setsid.o setsockopt.o settimeofday.o setuid.o shmat.o \
+       setsid.o setsockopt.o settimeofday.o setuid.o \
        __shmctl13.o shmdt.o shmget.o shutdown.o __sigaction14.o \
        __sigaltstack14.o __sigpending14.o __sigprocmask14.o __sigsuspend14.o \
        socket.o socketpair.o __stat13.o statfs.o \



Home | Main Index | Thread Index | Old Index