Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146434088
D6815.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
26 KB
Referenced Files
None
Subscribers
None
D6815.id.diff
View Options
Index: head/lib/libc/aarch64/sys/Makefile.inc
===================================================================
--- head/lib/libc/aarch64/sys/Makefile.inc
+++ head/lib/libc/aarch64/sys/Makefile.inc
@@ -6,7 +6,6 @@
#MDASM= ptrace.S
MDASM= cerror.S \
- pipe.S \
shmat.S \
sigreturn.S \
syscall.S \
Index: head/lib/libc/aarch64/sys/pipe.S
===================================================================
--- head/lib/libc/aarch64/sys/pipe.S
+++ head/lib/libc/aarch64/sys/pipe.S
@@ -1,52 +0,0 @@
-/*-
- * Copyright (c) 2014 The FreeBSD Foundation
- * All rights reserved.
- *
- * This software was developed by Andrew Turner under
- * sponsorship from the FreeBSD Foundation.
- *
- * 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 AUTHOR 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 AUTHOR 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 <machine/asm.h>
-__FBSDID("$FreeBSD$");
-
-#include "SYS.h"
-
-ENTRY(__sys_pipe)
- WEAK_REFERENCE(__sys_pipe, pipe)
-
- /* Backup the pointer passed to us */
- mov x2, x0
-
- /* Make the syscall */
- _SYSCALL(pipe)
- b.cs cerror
-
- /* Store the result */
- str w0, [x2, #0]
- str w1, [x2, #4]
-
- /* Return */
- mov x0, #0
- ret
-END(__sys_pipe)
Index: head/lib/libc/amd64/sys/Makefile.inc
===================================================================
--- head/lib/libc/amd64/sys/Makefile.inc
+++ head/lib/libc/amd64/sys/Makefile.inc
@@ -4,7 +4,7 @@
SRCS+= amd64_get_fsbase.c amd64_get_gsbase.c amd64_set_fsbase.c \
amd64_set_gsbase.c __vdso_gettc.c
-MDASM= vfork.S brk.S cerror.S exect.S getcontext.S pipe.S ptrace.S \
+MDASM= vfork.S brk.S cerror.S exect.S getcontext.S ptrace.S \
sbrk.S setlogin.S sigreturn.S
# Don't generate default code for these syscalls:
Index: head/lib/libc/amd64/sys/pipe.S
===================================================================
--- head/lib/libc/amd64/sys/pipe.S
+++ head/lib/libc/amd64/sys/pipe.S
@@ -1,53 +0,0 @@
-/*-
- * 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.
- * 4. 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.
- */
-
-#if defined(SYSLIBC_SCCS) && !defined(lint)
- .asciz "@(#)pipe.s 5.1 (Berkeley) 4/23/90"
-#endif /* SYSLIBC_SCCS and not lint */
-#include <machine/asm.h>
-__FBSDID("$FreeBSD$");
-
-#include "SYS.h"
-
- WEAK_REFERENCE(__sys_pipe, _pipe)
- WEAK_REFERENCE(__sys_pipe, pipe)
-ENTRY(__sys_pipe)
- mov $SYS_pipe,%rax
- KERNCALL
- jb HIDENAME(cerror)
- movl %eax,(%rdi) /* %rdi is preserved by syscall */
- movl %edx,4(%rdi)
- movq $0,%rax
- ret
-END(__sys_pipe)
-
- .section .note.GNU-stack,"",%progbits
Index: head/lib/libc/arm/sys/Makefile.inc
===================================================================
--- head/lib/libc/arm/sys/Makefile.inc
+++ head/lib/libc/arm/sys/Makefile.inc
@@ -2,7 +2,7 @@
SRCS+= __vdso_gettc.c
-MDASM= Ovfork.S brk.S cerror.S pipe.S ptrace.S sbrk.S shmat.S sigreturn.S syscall.S
+MDASM= Ovfork.S brk.S cerror.S ptrace.S sbrk.S shmat.S sigreturn.S syscall.S
# Don't generate default code for these syscalls:
NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o vfork.o yield.o
Index: head/lib/libc/arm/sys/pipe.S
===================================================================
--- head/lib/libc/arm/sys/pipe.S
+++ head/lib/libc/arm/sys/pipe.S
@@ -1,53 +0,0 @@
-/* $NetBSD: pipe.S,v 1.5 2003/08/07 16:42:04 agc 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 <machine/asm.h>
-__FBSDID("$FreeBSD$");
-#include "SYS.h"
-
-#ifdef WEAK_ALIAS
-WEAK_ALIAS(pipe, _pipe)
-WEAK_ALIAS(__sys_pipe, _pipe)
-#endif
-
-ENTRY(_pipe)
- mov r2, r0
- SYSTRAP(pipe)
- bcs PIC_SYM(CERROR, PLT)
- str r0, [r2, #0x0000]
- str r1, [r2, #0x0004]
- mov r0, #0x00000000
- RET
-END(_pipe)
-
- .section .note.GNU-stack,"",%progbits
Index: head/lib/libc/i386/sys/Makefile.inc
===================================================================
--- head/lib/libc/i386/sys/Makefile.inc
+++ head/lib/libc/i386/sys/Makefile.inc
@@ -8,7 +8,7 @@
i386_set_fsbase.c i386_set_gsbase.c i386_set_ioperm.c i386_set_ldt.c \
__vdso_gettc.c
-MDASM= Ovfork.S brk.S cerror.S exect.S getcontext.S pipe.S ptrace.S \
+MDASM= Ovfork.S brk.S cerror.S exect.S getcontext.S ptrace.S \
sbrk.S setlogin.S sigreturn.S syscall.S
# Don't generate default code for these syscalls:
Index: head/lib/libc/i386/sys/pipe.S
===================================================================
--- head/lib/libc/i386/sys/pipe.S
+++ head/lib/libc/i386/sys/pipe.S
@@ -1,49 +0,0 @@
-/*-
- * 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.
- * 4. 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.
- */
-
-#if defined(SYSLIBC_SCCS) && !defined(lint)
- .asciz "@(#)pipe.s 5.1 (Berkeley) 4/23/90"
-#endif /* SYSLIBC_SCCS and not lint */
-#include <machine/asm.h>
-__FBSDID("$FreeBSD$");
-
-#include "SYS.h"
-
-SYSCALL(pipe)
- movl 4(%esp),%ecx
- movl %eax,(%ecx)
- movl %edx,4(%ecx)
- movl $0,%eax
- ret
-END(__sys_pipe)
-
- .section .note.GNU-stack,"",%progbits
Index: head/lib/libc/mips/sys/Makefile.inc
===================================================================
--- head/lib/libc/mips/sys/Makefile.inc
+++ head/lib/libc/mips/sys/Makefile.inc
@@ -3,7 +3,7 @@
SRCS+= trivial-vdso_tc.c
MDASM= Ovfork.S brk.S cerror.S exect.S \
- pipe.S ptrace.S sbrk.S syscall.S
+ ptrace.S sbrk.S syscall.S
# Don't generate default code for these syscalls:
NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o vfork.o yield.o
Index: head/lib/libc/mips/sys/pipe.S
===================================================================
--- head/lib/libc/mips/sys/pipe.S
+++ head/lib/libc/mips/sys/pipe.S
@@ -1,57 +0,0 @@
-/* $NetBSD: pipe.S,v 1.11 2005/04/22 06:58:01 simonb 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 <machine/asm.h>
-__FBSDID("$FreeBSD$");
-#include "SYS.h"
-
-#if defined(LIBC_SCCS) && !defined(lint)
- ASMSTR("from: @(#)pipe.s 8.1 (Berkeley) 6/4/93")
- ASMSTR("$NetBSD: pipe.S,v 1.11 2005/04/22 06:58:01 simonb Exp $")
-#endif /* LIBC_SCCS and not lint */
-
-LEAF(__sys_pipe)
- WEAK_ALIAS(pipe, __sys_pipe)
- WEAK_ALIAS(_pipe, __sys_pipe)
- PIC_PROLOGUE(__sys_pipe)
- li v0, SYS_pipe # pipe(fildes) int fildes[2];
- syscall
- bne a3, zero, 1f
- sw v0, 0(a0) # store the two file descriptors
- sw v1, 4(a0)
- move v0, zero
- PIC_RETURN()
-1:
- PIC_TAILCALL(__cerror)
-END(__sys_pipe)
Index: head/lib/libc/powerpc/sys/Makefile.inc
===================================================================
--- head/lib/libc/powerpc/sys/Makefile.inc
+++ head/lib/libc/powerpc/sys/Makefile.inc
@@ -1,6 +1,6 @@
# $FreeBSD$
-MDASM+= brk.S cerror.S exect.S pipe.S ptrace.S sbrk.S setlogin.S
+MDASM+= brk.S cerror.S exect.S ptrace.S sbrk.S setlogin.S
# Don't generate default code for these syscalls:
NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o yield.o
Index: head/lib/libc/powerpc/sys/pipe.S
===================================================================
--- head/lib/libc/powerpc/sys/pipe.S
+++ head/lib/libc/powerpc/sys/pipe.S
@@ -1,46 +0,0 @@
-/*-
- * Copyright (c) 2002 Peter Grehan.
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
- */
-/* $NetBSD: pipe.S,v 1.6 2000/09/28 08:38:54 kleink Exp $ */
-
-#include <machine/asm.h>
-__FBSDID("$FreeBSD$");
-
-#include "SYS.h"
-
-ENTRY(pipe)
- mr %r5,%r3 /* save pointer */
- li %r0,SYS_pipe
- sc /* r5 is preserved */
- bso 1f
- stw %r3,0(%r5) /* success, store fds */
- stw %r4,4(%r5)
- li %r3,0
- blr /* and return 0 */
-1:
- b PIC_PLT(HIDENAME(cerror))
-END(pipe)
-
- .section .note.GNU-stack,"",%progbits
Index: head/lib/libc/powerpc64/sys/Makefile.inc
===================================================================
--- head/lib/libc/powerpc64/sys/Makefile.inc
+++ head/lib/libc/powerpc64/sys/Makefile.inc
@@ -1,6 +1,6 @@
# $FreeBSD$
-MDASM+= brk.S cerror.S exect.S pipe.S ptrace.S sbrk.S setlogin.S
+MDASM+= brk.S cerror.S exect.S ptrace.S sbrk.S setlogin.S
# Don't generate default code for these syscalls:
NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o yield.o
Index: head/lib/libc/powerpc64/sys/pipe.S
===================================================================
--- head/lib/libc/powerpc64/sys/pipe.S
+++ head/lib/libc/powerpc64/sys/pipe.S
@@ -1,54 +0,0 @@
-/*-
- * Copyright (c) 2002 Peter Grehan.
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
- */
-/* $NetBSD: pipe.S,v 1.6 2000/09/28 08:38:54 kleink Exp $ */
-
-#include <machine/asm.h>
-__FBSDID("$FreeBSD$");
-
-#include "SYS.h"
-
-ENTRY(pipe)
- mr %r5,%r3 /* save pointer */
- li %r0,SYS_pipe
- sc /* r5 is preserved */
- bso 1f
- stw %r3,0(%r5) /* success, store fds */
- stw %r4,4(%r5)
- li %r3,0
- blr /* and return 0 */
-1:
- mflr %r0
- std %r0,16(%r1)
- stdu %r1,-48(%r1)
- bl HIDENAME(cerror)
- nop
- ld %r1,0(%r1)
- ld %r0,16(%r1)
- mtlr %r0
- blr
-END(pipe)
-
- .section .note.GNU-stack,"",%progbits
Index: head/lib/libc/riscv/sys/Makefile.inc
===================================================================
--- head/lib/libc/riscv/sys/Makefile.inc
+++ head/lib/libc/riscv/sys/Makefile.inc
@@ -4,7 +4,6 @@
#MDASM= ptrace.S
MDASM= cerror.S \
- pipe.S \
shmat.S \
sigreturn.S \
syscall.S \
Index: head/lib/libc/riscv/sys/pipe.S
===================================================================
--- head/lib/libc/riscv/sys/pipe.S
+++ head/lib/libc/riscv/sys/pipe.S
@@ -1,57 +0,0 @@
-/*-
- * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com>
- * All rights reserved.
- *
- * Portions of this software were developed by SRI International and the
- * University of Cambridge Computer Laboratory under DARPA/AFRL contract
- * FA8750-10-C-0237 ("CTSRD"), as part of the DARPA CRASH research programme.
- *
- * Portions of this software were developed by the University of Cambridge
- * Computer Laboratory as part of the CTSRD Project, with support from the
- * UK Higher Education Innovation Fund (HEIF).
- *
- * 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 AUTHOR 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 AUTHOR 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 <machine/asm.h>
-__FBSDID("$FreeBSD$");
-
-#include "SYS.h"
-
-ENTRY(__sys_pipe)
- WEAK_REFERENCE(__sys_pipe, pipe)
-
- /* Backup the pointer passed to us */
- mv a2, a0
-
- /* Make the syscall */
- _SYSCALL(pipe)
- bnez t0, cerror
-
- /* Store the result */
- sw a0, 0(a2)
- sw a1, 4(a2)
-
- /* Return */
- li a0, 0
- ret
-END(__sys_pipe)
Index: head/lib/libc/sparc64/sys/Makefile.inc
===================================================================
--- head/lib/libc/sparc64/sys/Makefile.inc
+++ head/lib/libc/sparc64/sys/Makefile.inc
@@ -12,7 +12,7 @@
CFLAGS+= -I${LIBC_SRCTOP}/sparc64/fpu
-MDASM+= brk.S cerror.S exect.S pipe.S ptrace.S sbrk.S setlogin.S sigaction1.S
+MDASM+= brk.S cerror.S exect.S ptrace.S sbrk.S setlogin.S sigaction1.S
# Don't generate default code for these syscalls:
NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o yield.o
Index: head/lib/libc/sparc64/sys/pipe.S
===================================================================
--- head/lib/libc/sparc64/sys/pipe.S
+++ head/lib/libc/sparc64/sys/pipe.S
@@ -1,57 +0,0 @@
-/*
- * 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.
- * 4. 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
- */
-
-#if defined(SYSLIBC_SCCS) && !defined(lint)
- .asciz "@(#)pipe.s 8.1 (Berkeley) 6/4/93"
-#if 0
- RCSID("$NetBSD: pipe.S,v 1.3 2000/09/28 08:38:55 kleink Exp $")
-#endif
-#endif /* SYSLIBC_SCCS and not lint */
-#include <machine/asm.h>
-__FBSDID("$FreeBSD$");
-
-#include "SYS.h"
-
-_SYSENTRY(pipe)
- mov %o0, %o2
- mov SYS_pipe, %g1
- ta %xcc, ST_SYSCALL
- bcc,a,pt %xcc, 1f
- stw %o0, [%o2]
- ERROR()
-1: stw %o1, [%o2 + 4]
- retl
- clr %o0
-_SYSEND(pipe)
Index: head/lib/libc/sys/Makefile.inc
===================================================================
--- head/lib/libc/sys/Makefile.inc
+++ head/lib/libc/sys/Makefile.inc
@@ -28,6 +28,8 @@
NOASM+= futimens.o utimensat.o
PSEUDO+= _futimens.o _utimensat.o
+SRCS+= pipe.c
+
INTERPOSED = \
accept \
accept4 \
Index: head/lib/libc/sys/pipe.2
===================================================================
--- head/lib/libc/sys/pipe.2
+++ head/lib/libc/sys/pipe.2
@@ -28,7 +28,7 @@
.\" @(#)pipe.2 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$
.\"
-.Dd May 1, 2013
+.Dd June 22, 2016
.Dt PIPE 2
.Os
.Sh NAME
@@ -118,6 +118,9 @@
.Fn pipe2
system calls will fail if:
.Bl -tag -width Er
+.It Bq Er EFAULT
+.Ar fildes
+argument points to an invalid memory location.
.It Bq Er EMFILE
Too many descriptors are active.
.It Bq Er ENFILE
Index: head/lib/libc/sys/pipe.c
===================================================================
--- head/lib/libc/sys/pipe.c
+++ head/lib/libc/sys/pipe.c
@@ -0,0 +1,47 @@
+/*-
+ * Copyright (c) 2016 SRI International
+ * All rights reserved.
+ *
+ * This software was developed by SRI International and the University of
+ * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237
+ * ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
+ * 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 AUTHOR 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 AUTHOR 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.
+ *
+ * $FreeBSD$
+ */
+
+#include <sys/cdefs.h>
+
+#include <unistd.h>
+
+__weak_reference(__sys_pipe, pipe);
+__weak_reference(__sys_pipe, _pipe);
+
+extern int __sys_pipe2(int fildes[2], int flags);
+
+int
+__sys_pipe(int fildes[2])
+{
+
+ return (__sys_pipe2(fildes, 0));
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 3, 4:09 PM (9 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29205030
Default Alt Text
D6815.id.diff (26 KB)
Attached To
Mode
D6815: Replace libc's call to pipe(2) with pipe2(2).
Attached
Detach File
Event Timeline
Log In to Comment