aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/sys_linux_386.s
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2022-03-03 10:19:07 +0100
committerTobias Klauser <tobias.klauser@gmail.com>2022-03-03 20:47:17 +0000
commit9d34fc5108d91bfcce3c465069dbb2c563af4229 (patch)
tree266610efcdc56e77e06bc02888a2452487e4f45f /src/runtime/sys_linux_386.s
parent58804ea67a28c1d8e37ed548b685bc0c09638886 (diff)
downloadgo-9d34fc5108d91bfcce3c465069dbb2c563af4229.tar.xz
runtime: remove fallback to pipe on platforms with pipe2
On Linux, the minimum required kernel version for Go 1.18 was be changed to 2.6.32, see #45964. The pipe2 syscall was added in 2.6.27. All other platforms already provide the pipe2 syscall in the minimum supported version: - DragonFly BSD added it in version 4.2, see https://www.dragonflybsd.org/release42/ - FreeBSD added it in version 10.0, see https://www.freebsd.org/cgi/man.cgi?pipe(2)#end - NetBSD added it in version 6.0, see https://man.netbsd.org/pipe2.2#HISTORY - OpenBSD added it in version 5.7, see https://man.openbsd.org/pipe.2#HISTORY - Illumos supports it since 2013, see https://www.illumos.org/issues/3714 - Solaris supports it since 11.4 This also allows to remove setNonblock which was only used in the pipe fallback path on these platforms. Change-Id: I1f40d32fd3065d74e22af77b9ff2292b9cf66706 Reviewed-on: https://go-review.googlesource.com/c/go/+/389354 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/sys_linux_386.s')
-rw-r--r--src/runtime/sys_linux_386.s24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/runtime/sys_linux_386.s b/src/runtime/sys_linux_386.s
index 6df812234c..fef68d51dc 100644
--- a/src/runtime/sys_linux_386.s
+++ b/src/runtime/sys_linux_386.s
@@ -32,7 +32,6 @@
#define SYS_getpid 20
#define SYS_access 33
#define SYS_kill 37
-#define SYS_pipe 42
#define SYS_brk 45
#define SYS_fcntl 55
#define SYS_munmap 91
@@ -130,14 +129,6 @@ TEXT runtime·read(SB),NOSPLIT,$0
MOVL AX, ret+12(FP)
RET
-// func pipe() (r, w int32, errno int32)
-TEXT runtime·pipe(SB),NOSPLIT,$0-12
- MOVL $SYS_pipe, AX
- LEAL r+0(FP), BX
- INVOKE_SYSCALL
- MOVL AX, errno+8(FP)
- RET
-
// func pipe2(flags int32) (r, w int32, errno int32)
TEXT runtime·pipe2(SB),NOSPLIT,$0-16
MOVL $SYS_pipe2, AX
@@ -782,21 +773,6 @@ TEXT runtime·closeonexec(SB),NOSPLIT,$0
INVOKE_SYSCALL
RET
-// func runtime·setNonblock(fd int32)
-TEXT runtime·setNonblock(SB),NOSPLIT,$0-4
- MOVL $SYS_fcntl, AX
- MOVL fd+0(FP), BX // fd
- MOVL $3, CX // F_GETFL
- MOVL $0, DX
- INVOKE_SYSCALL
- MOVL fd+0(FP), BX // fd
- MOVL $4, CX // F_SETFL
- MOVL $0x800, DX // O_NONBLOCK
- ORL AX, DX
- MOVL $SYS_fcntl, AX
- INVOKE_SYSCALL
- RET
-
// int access(const char *name, int mode)
TEXT runtime·access(SB),NOSPLIT,$0
MOVL $SYS_access, AX