diff --git a/lib/libc/arch/alpha/sys/pipe.S b/lib/libc/arch/alpha/sys/pipe.S deleted file mode 100644 index cddc812c59f4..000000000000 --- a/lib/libc/arch/alpha/sys/pipe.S +++ /dev/null @@ -1,42 +0,0 @@ -/* $NetBSD: pipe.S,v 1.4 2001/05/07 17:19:18 kleink Exp $ */ - -/* - * Copyright (c) 1994, 1995 Carnegie-Mellon University. - * All rights reserved. - * - * Author: Chris G. Demetriou - * - * Permission to use, copy, modify and distribute this software and - * its documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND - * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. - */ - -#include "SYS.h" - -#ifdef WEAK_ALIAS -WEAK_ALIAS(pipe, _pipe) -#endif - -LEAF(_pipe, 0) - CALLSYS_ERROR(pipe) - stl v0, 0(a0) - stl a4, 4(a0) - mov zero, v0 - RET -END(_pipe) diff --git a/lib/libc/arch/arm/sys/pipe.S b/lib/libc/arch/arm/sys/pipe.S deleted file mode 100644 index cc0d98b011ee..000000000000 --- a/lib/libc/arch/arm/sys/pipe.S +++ /dev/null @@ -1,47 +0,0 @@ -/* $NetBSD: pipe.S,v 1.8 2013/08/16 22:21:59 matt Exp $ */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * 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. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * from: @(#)pipe.s 5.1 (Berkeley) 4/23/90 - */ - -#include "SYS.h" - -#ifdef WEAK_ALIAS -WEAK_ALIAS(pipe, _pipe) -#endif - -ENTRY(_pipe) - mov r2, r0 - SYSTRAP(pipe) - _INVOKE_CERROR() - stmia r2!, {r0-r1} - movs r0, #0 - RET -END(_pipe) diff --git a/lib/libc/arch/hppa/sys/pipe.S b/lib/libc/arch/hppa/sys/pipe.S deleted file mode 100644 index 00970ae79d15..000000000000 --- a/lib/libc/arch/hppa/sys/pipe.S +++ /dev/null @@ -1,58 +0,0 @@ -/* $NetBSD: pipe.S,v 1.3 2003/10/06 05:30:21 matt Exp $ */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * the Systems Programming Group of the University of Utah Computer - * Science Department. - * - * 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. Neither the name of the University 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 REGENTS 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 REGENTS 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" - -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 - RCSID("from: @(#)pipe.s 5.1 (Berkeley) 5/12/90") -#else - RCSID("$NetBSD: pipe.S,v 1.3 2003/10/06 05:30:21 matt Exp $") -#endif -#endif /* LIBC_SCCS and not lint */ - -#ifdef WEAK_ALIAS - WEAK_ALIAS(pipe, _pipe) -#endif - -ENTRY(_pipe,0) - stw %arg0, HPPA_FRAME_ARG(0)(%sp) - SYSCALL(pipe) - ldw HPPA_FRAME_ARG(0)(%sp), %arg0 - stw %ret0, 0(%arg0) - stw %ret1, 4(%arg0) - bv %r0(%rp) - copy %r0, %ret0 -EXIT(_pipe) diff --git a/lib/libc/arch/i386/sys/pipe.S b/lib/libc/arch/i386/sys/pipe.S deleted file mode 100644 index f6b30bf9b963..000000000000 --- a/lib/libc/arch/i386/sys/pipe.S +++ /dev/null @@ -1,54 +0,0 @@ -/* $NetBSD: pipe.S,v 1.7 2014/05/23 02:34:19 uebayasi Exp $ */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * 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. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * from: @(#)pipe.s 5.1 (Berkeley) 4/23/90 - */ - -#include -#if defined(SYSLIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: pipe.S,v 1.7 2014/05/23 02:34:19 uebayasi Exp $") -#endif /* SYSLIBC_SCCS and not lint */ - -#include "SYS.h" - -#ifdef WEAK_ALIAS -WEAK_ALIAS(pipe, _pipe) -#endif - -_SYSCALL(_pipe,pipe) - movl 4(%esp),%ecx - movl %eax,(%ecx) - movl %edx,4(%ecx) - xorl %eax,%eax - ret -END(_pipe) diff --git a/lib/libc/arch/ia64/sys/pipe.S b/lib/libc/arch/ia64/sys/pipe.S deleted file mode 100644 index e545e5a509c9..000000000000 --- a/lib/libc/arch/ia64/sys/pipe.S +++ /dev/null @@ -1,50 +0,0 @@ -/* $NetBSD: pipe.S,v 1.2 2006/09/23 17:39:34 cherry Exp $ */ - -/* - * Copyright (c) 1994, 1995 Carnegie-Mellon University. - * All rights reserved. - * - * Author: Chris G. Demetriou - * - * Permission to use, copy, modify and distribute this software and - * its documentation is hereby granted, provided that both the copyright - * notice and this permission notice appear in all copies of the - * software, derivative works or modified versions, and any portions - * thereof, and that both notices appear in supporting documentation. - * - * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" - * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND - * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. - * - * Carnegie Mellon requests users of this software to return to - * - * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU - * School of Computer Science - * Carnegie Mellon University - * Pittsburgh PA 15213-3890 - * - * any improvements or extensions that they make and grant Carnegie the - * rights to redistribute these changes. - */ - -#include -/* __FBSDID("$FreeBSD: src/lib/libc/ia64/sys/pipe.S,v 1.4 2003/05/16 21:26:39 marcel Exp $"); */ - -#include "SYS.h" - -#ifdef WEAK_ALIAS -WEAK_ALIAS(pipe, _pipe) -#endif -/* XXX: Relook param passing */ - -ENTRY(_pipe, 1) - st8 [sp]=r32 - CALLSYS_ERROR(pipe) - ld8 r14=[sp] - ;; - st4 [r14]=ret0,4 - ;; - st4 [r14]=ret1 - mov ret0=0 - br.ret.sptk.few rp -END(_pipe) diff --git a/lib/libc/arch/m68k/sys/pipe.S b/lib/libc/arch/m68k/sys/pipe.S deleted file mode 100644 index 37960a3c1b98..000000000000 --- a/lib/libc/arch/m68k/sys/pipe.S +++ /dev/null @@ -1,56 +0,0 @@ -/* $NetBSD: pipe.S,v 1.8 2013/07/16 22:16:53 matt Exp $ */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * the Systems Programming Group of the University of Utah Computer - * Science Department. - * - * 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. Neither the name of the University 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 REGENTS 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 REGENTS 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" - -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 - RCSID("from: @(#)pipe.s 5.1 (Berkeley) 5/12/90") -#else - RCSID("$NetBSD: pipe.S,v 1.8 2013/07/16 22:16:53 matt Exp $") -#endif -#endif /* LIBC_SCCS and not lint */ - -#ifdef WEAK_ALIAS -WEAK_ALIAS(pipe, _pipe) -#endif - -_SYSCALL(_pipe,pipe) - movl 4(%sp),%a0 - movl %d0,(%a0)+ - movl %d1,(%a0) - clrl %d0 - rts -END(_pipe) diff --git a/lib/libc/arch/mips/sys/pipe.S b/lib/libc/arch/mips/sys/pipe.S deleted file mode 100644 index d4047e241d56..000000000000 --- a/lib/libc/arch/mips/sys/pipe.S +++ /dev/null @@ -1,61 +0,0 @@ -/* $NetBSD: pipe.S,v 1.12 2009/12/14 01:07:42 matt Exp $ */ - -/*- - * Copyright (c) 1991, 1993 - * The Regents of the University of California. All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * Ralph Campbell. - * - * 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. Neither the name of the University 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 REGENTS 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 REGENTS 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" - -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 - RCSID("from: @(#)pipe.s 8.1 (Berkeley) 6/4/93") -#else - RCSID("$NetBSD: pipe.S,v 1.12 2009/12/14 01:07:42 matt Exp $") -#endif -#endif /* LIBC_SCCS and not lint */ - -#ifdef WEAK_ALIAS -WEAK_ALIAS(pipe, _pipe) -#endif - -LEAF(_pipe) - PIC_PROLOGUE(_pipe); - - SYSTRAP(pipe) # pipe(fildes) int fildes[2]; - - bne a3, zero, 1f - INT_S v0, 0(a0) # store the two file descriptors - INT_S v1, 4(a0) - move v0, zero - PIC_RETURN() -1: - PIC_TAILCALL(__cerror) -END(_pipe) diff --git a/lib/libc/arch/or1k/sys/pipe.S b/lib/libc/arch/or1k/sys/pipe.S deleted file mode 100644 index b6eb7988eb07..000000000000 --- a/lib/libc/arch/or1k/sys/pipe.S +++ /dev/null @@ -1,23 +0,0 @@ -/* $NetBSD: pipe.S,v 1.1 2014/09/03 19:34:26 matt Exp $ */ - -#include "SYS.h" - -#if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: pipe.S,v 1.1 2014/09/03 19:34:26 matt Exp $") -#endif /* LIBC_SCCS && !lint */ - -#ifdef WEAK_ALIAS -WEAK_ALIAS(pipe, _pipe) -#endif - -ENTRY(_pipe) - l.or r5,r3,r0 # save pointer - _DOSYSCALL(pipe) # assume, that r5 is kept - l.bf _C_LABEL(__cerror) - l.nop - l.sw 0(r5),r11 # success, store fds - l.sw 4(r5),r12 - l.xor r11,r11,r11 - l.jr lr # and return 0 - l.nop -END(_pipe) diff --git a/lib/libc/arch/powerpc/sys/pipe.S b/lib/libc/arch/powerpc/sys/pipe.S deleted file mode 100644 index 8d6f041e5cc8..000000000000 --- a/lib/libc/arch/powerpc/sys/pipe.S +++ /dev/null @@ -1,23 +0,0 @@ -/* $NetBSD: pipe.S,v 1.9 2014/08/23 02:24:22 matt Exp $ */ - -#include "SYS.h" - -#if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: pipe.S,v 1.9 2014/08/23 02:24:22 matt Exp $") -#endif /* LIBC_SCCS && !lint */ - -#ifdef WEAK_ALIAS -WEAK_ALIAS(pipe, _pipe) -#endif - -ENTRY(_pipe) - mr %r5,%r3 # save pointer - _DOSYSCALL(pipe) # assume, that r5 is kept - bso 1f - stint %r3,0(%r5) # success, store fds - stint %r4,4(%r5) - li %r3,0 - blr # and return 0 -1: - BRANCH_TO_CERROR() -END(_pipe) diff --git a/lib/libc/arch/powerpc64/sys/pipe.S b/lib/libc/arch/powerpc64/sys/pipe.S deleted file mode 100644 index 2f66db9c640d..000000000000 --- a/lib/libc/arch/powerpc64/sys/pipe.S +++ /dev/null @@ -1,19 +0,0 @@ -/* $NetBSD: pipe.S,v 1.2 2014/08/23 02:24:22 matt Exp $ */ - -#include "SYS.h" - -#ifdef WEAK_ALIAS -WEAK_ALIAS(pipe, _pipe) -#endif - -ENTRY(_pipe) - mr %r5,%r3 # save pointer - _DOSYSCALL(pipe) # assume, that r5 is kept - bso 1f - stint %r3,0(%r5) # success, store fds - stint %r4,4(%r5) - li %r3,0 - blr # and return 0 -1: - BRANCH_TO_CERROR() -END(_pipe) diff --git a/lib/libc/arch/riscv/sys/pipe.S b/lib/libc/arch/riscv/sys/pipe.S deleted file mode 100644 index 34daef12f612..000000000000 --- a/lib/libc/arch/riscv/sys/pipe.S +++ /dev/null @@ -1,51 +0,0 @@ -/* $NetBSD: pipe.S,v 1.2 2015/03/27 06:44:28 matt Exp $ */ - -/*- - * Copyright (c) 2014 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Matt Thomas of 3am Software Foundry. - * - * 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. - * - * 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" - -#if defined(LIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: pipe.S,v 1.2 2015/03/27 06:44:28 matt Exp $") -#endif /* LIBC_SCCS and not lint */ - -#ifdef WEAK_ALIAS -WEAK_ALIAS(pipe, _pipe) -#endif - -ENTRY(_pipe) - mv a2, a0 # a0 will be overwritten - SYSTRAP(pipe) # pipe(fildes) int fildes[2]; - JUMP_TO_CERROR() /* error */ - /* success */ - sw a0, 0(a2) # store the two file descriptors - sw a1, __SIZEOF_INT__(a2) - li a0, 0 - ret -END(_pipe) diff --git a/lib/libc/arch/sh3/sys/pipe.S b/lib/libc/arch/sh3/sys/pipe.S deleted file mode 100644 index 11c6b953bcde..000000000000 --- a/lib/libc/arch/sh3/sys/pipe.S +++ /dev/null @@ -1,52 +0,0 @@ -/* $NetBSD: pipe.S,v 1.7 2006/01/06 05:23:46 uwe Exp $ */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * 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. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * from: @(#)pipe.s 5.1 (Berkeley) 4/23/90 - */ - -#include -#if defined(SYSLIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: pipe.S,v 1.7 2006/01/06 05:23:46 uwe Exp $") -#endif /* SYSLIBC_SCCS and not lint */ - -#include "SYS.h" - -#ifdef WEAK_ALIAS -WEAK_ALIAS(pipe,_pipe) -#endif - -_SYSCALL(_pipe,pipe) - mov.l r0, @r4 - mov.l r1, @(4, r4) - rts - mov #0, r0 diff --git a/lib/libc/arch/sparc/sys/pipe.S b/lib/libc/arch/sparc/sys/pipe.S deleted file mode 100644 index 457c713f3f88..000000000000 --- a/lib/libc/arch/sparc/sys/pipe.S +++ /dev/null @@ -1,63 +0,0 @@ -/* $NetBSD: pipe.S,v 1.4 2003/08/07 16:42:25 agc Exp $ */ - -/* - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * from: Header: pipe.s,v 1.1 91/07/06 13:05:58 torek Exp - */ - -#include -#if defined(SYSLIBC_SCCS) && !defined(lint) -#if 0 - .asciz "@(#)pipe.s 8.1 (Berkeley) 6/4/93" -#else - RCSID("$NetBSD: pipe.S,v 1.4 2003/08/07 16:42:25 agc Exp $") -#endif -#endif /* SYSLIBC_SCCS and not lint */ - -#include "SYS.h" - -#ifdef WEAK_ALIAS -WEAK_ALIAS(pipe, _pipe) -#endif - -ENTRY(_pipe) - mov %o0, %o2 ! save pointer - mov SYS_pipe, %g1 - t ST_SYSCALL ! pipe() - bcc,a 1f - st %o0, [%o2] ! success, store fds - ERROR() -1: - st %o1, [%o2 + 4] - retl ! and return 0 - clr %o0 diff --git a/lib/libc/arch/sparc64/sys/pipe.S b/lib/libc/arch/sparc64/sys/pipe.S deleted file mode 100644 index c0c6ecfc9613..000000000000 --- a/lib/libc/arch/sparc64/sys/pipe.S +++ /dev/null @@ -1,63 +0,0 @@ -/* $NetBSD: pipe.S,v 1.4 2003/08/07 16:42:30 agc Exp $ */ - -/* - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. - * - * This software was developed by the Computer Systems Engineering group - * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and - * contributed to Berkeley. - * - * 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. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * from: Header: pipe.s,v 1.1 91/07/06 13:05:58 torek Exp - */ - -#include -#if defined(SYSLIBC_SCCS) && !defined(lint) -#if 0 - .asciz "@(#)pipe.s 8.1 (Berkeley) 6/4/93" -#else - RCSID("$NetBSD: pipe.S,v 1.4 2003/08/07 16:42:30 agc Exp $") -#endif -#endif /* SYSLIBC_SCCS and not lint */ - -#include "SYS.h" - -#ifdef WEAK_ALIAS -WEAK_ALIAS(pipe, _pipe) -#endif - -ENTRY(_pipe) - mov %o0, %o2 /* save pointer */ - mov SYS_pipe, %g1 - t ST_SYSCALL /* pipe() */ - bcc,a 1f - st %o0, [%o2] /* success, store fds */ - ERROR() -1: - st %o1, [%o2 + 4] - retl /* and return 0 */ - clr %o0 diff --git a/lib/libc/arch/vax/sys/pipe.S b/lib/libc/arch/vax/sys/pipe.S deleted file mode 100644 index 60ded6aed33e..000000000000 --- a/lib/libc/arch/vax/sys/pipe.S +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 1983, 1993 - * The Regents of the University of California. 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. Neither the name of the University 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 REGENTS 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 REGENTS 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" - -#if defined(SYSLIBC_SCCS) - /* .asciz "@(#)pipe.s 8.1 (Berkeley) 6/4/93" */ -RCSID("$NetBSD: pipe.S,v 1.5 2011/01/25 02:38:15 matt Exp $") -#endif - -#ifdef WEAK_ALIAS -WEAK_ALIAS(pipe, _pipe) -#endif - -_SYSCALL(_pipe,pipe) - movl 4(%ap),%r2 - movl %r0,(%r2)+ - movl %r1,(%r2) - clrl %r0 - ret -END(_pipe) diff --git a/lib/libc/arch/x86_64/sys/pipe.S b/lib/libc/arch/x86_64/sys/pipe.S deleted file mode 100644 index 023c7800e8dd..000000000000 --- a/lib/libc/arch/x86_64/sys/pipe.S +++ /dev/null @@ -1,53 +0,0 @@ -/* $NetBSD: pipe.S,v 1.3 2014/05/22 15:01:57 uebayasi Exp $ */ - -/*- - * Copyright (c) 1990 The Regents of the University of California. - * All rights reserved. - * - * This code is derived from software contributed to Berkeley by - * William Jolitz. - * - * 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. Neither the name of the University 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 REGENTS 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 REGENTS 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. - * - * from: @(#)pipe.s 5.1 (Berkeley) 4/23/90 - */ - -#include -#if defined(SYSLIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: pipe.S,v 1.3 2014/05/22 15:01:57 uebayasi Exp $") -#endif /* SYSLIBC_SCCS and not lint */ - -#include "SYS.h" - -#ifdef WEAK_ALIAS -WEAK_ALIAS(pipe, _pipe) -#endif - -_SYSCALL(_pipe,pipe) - movl %eax,(%rdi) - movl %edx,4(%rdi) - xorl %eax,%eax - ret -END(_pipe) diff --git a/lib/libc/sys/Lint_pipe.c b/lib/libc/sys/Lint_pipe.c deleted file mode 100644 index a86db166f822..000000000000 --- a/lib/libc/sys/Lint_pipe.c +++ /dev/null @@ -1,16 +0,0 @@ -/* $NetBSD: Lint_pipe.c,v 1.2 2000/06/14 06:49:10 cgd Exp $ */ - -/* - * This file placed in the public domain. - * Chris Demetriou, November 5, 1997. - */ - -#include - -/*ARGSUSED*/ -int -pipe(filedes) - int filedes[2]; -{ - return (0); -} diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index d61ee6c3c0ec..660e73db9b88 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -7,19 +7,19 @@ # other sources shared with the kernel, used in syscalls SRCS+= cpuset.c # glue to offer userland wrappers for some syscalls -SRCS+= posix_fadvise.c posix_madvise.c sched.c sigqueue.c sigtimedwait.c \ - sigwait.c sigwaitinfo.c statvfs.c swapon.c semctl.c \ - clock_getcpuclockid.c accept4.c +SRCS+= accept4.c pipe.c clock_getcpuclockid.c posix_fadvise.c \ + posix_madvise.c sched.c sigqueue.c sigtimedwait.c \ + sigwait.c sigwaitinfo.c statvfs.c swapon.c semctl.c .if ${RUMPRUN} != "yes" # modules with non-default implementations on at least one architecture: -SRCS+= __clone.S __vfork14.S brk.S fork.S pipe.S \ +SRCS+= __clone.S __vfork14.S brk.S fork.S \ getcontext.S \ ptrace.S sbrk.S shmat.S \ syscall.S __syscall.S __clone.S cerror.S _LSRC+= Lint___clone.c Lint___vfork14.c Lint_brk.c Lint_clone.c \ - Lint_getcontext.c Lint_pipe.c Lint_ptrace.c \ + Lint_getcontext.c Lint_ptrace.c \ Lint_sbrk.c Lint___sigaction14.c Lint_syscall.c Lint___syscall.c \ LintSysNormal.c LintSysNoerr.c LintSysPseudoNoerr.c diff --git a/lib/libc/arch/aarch64/sys/pipe.S b/lib/libc/sys/pipe.c similarity index 78% rename from lib/libc/arch/aarch64/sys/pipe.S rename to lib/libc/sys/pipe.c index 878130a4ea4c..d700045758ad 100644 --- a/lib/libc/arch/aarch64/sys/pipe.S +++ b/lib/libc/sys/pipe.c @@ -1,12 +1,9 @@ -/* $NetBSD: pipe.S,v 1.1 2014/08/10 05:47:37 matt Exp $ */ +/* $NetBSD$ */ /*- - * Copyright (c) 2014 The NetBSD Foundation, Inc. + * Copyright (c) 2017 The NetBSD Foundation, Inc. * All rights reserved. * - * This code is derived from software contributed to The NetBSD Foundation - * by Matt Thomas of 3am Software Foundry. - * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -29,15 +26,19 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include "SYS.h" +#include +__RCSID("$NetBSD$"); + +#include "namespace.h" +#include + +#ifdef __weak_alias +__weak_alias(pipe,_pipe) +#endif -WEAK_ALIAS(pipe, _pipe) +int +pipe(int fildes[2]) +{ -ENTRY(_pipe) - mov x9, x0 - SYSTRAP(pipe) - _INVOKE_CERROR() - stp w0, w1, [x9] - mov w0, wzr - RET -END(_pipe) + return pipe2(fildes, 0); +}