aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2022-06-07 07:25:10 +0200
committerGopher Robot <gobot@golang.org>2022-06-08 01:54:08 +0000
commit2882786bf4cd779f166e9ced82a4da2ea0f8b1f9 (patch)
treefb18be172b1ff068fe81f528cc9fd7f61c5a09ab
parentdecdd87bea5ab380b6c2a656735db9b2eb08a202 (diff)
downloadgo-2882786bf4cd779f166e9ced82a4da2ea0f8b1f9.tar.xz
runtime: remove unused pipe and setNonblock on linux/loong64
CL 389354 removed the fallback to pipe on all platforms with pipe2. This is the case for linux. Thus, pipe and setNonblock are no longer needed on linux/loong64 too. Change-Id: I089adf918d0fd8de5d4d61a893707a2660f89183 Reviewed-on: https://go-review.googlesource.com/c/go/+/410736 Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Run-TryBot: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
-rw-r--r--src/runtime/defs_linux_loong64.go1
-rw-r--r--src/runtime/sys_linux_loong64.s24
2 files changed, 0 insertions, 25 deletions
diff --git a/src/runtime/defs_linux_loong64.go b/src/runtime/defs_linux_loong64.go
index 3e0fac0298..dda4009fb0 100644
--- a/src/runtime/defs_linux_loong64.go
+++ b/src/runtime/defs_linux_loong64.go
@@ -10,7 +10,6 @@ const (
_EINTR = 0x4
_EAGAIN = 0xb
_ENOMEM = 0xc
- _ENOSYS = 0x26
_PROT_NONE = 0x0
_PROT_READ = 0x1
diff --git a/src/runtime/sys_linux_loong64.s b/src/runtime/sys_linux_loong64.s
index 07628ba499..36a92df87c 100644
--- a/src/runtime/sys_linux_loong64.s
+++ b/src/runtime/sys_linux_loong64.s
@@ -107,15 +107,6 @@ TEXT runtime·read(SB),NOSPLIT|NOFRAME,$0-28
MOVW R4, ret+24(FP)
RET
-// func pipe() (r, w int32, errno int32)
-TEXT runtime·pipe(SB),NOSPLIT|NOFRAME,$0-12
- MOVV $r+0(FP), R4
- MOVV R0, R5
- MOVV $SYS_pipe2, R11
- SYSCALL
- MOVW R4, errno+8(FP)
- RET
-
// func pipe2(flags int32) (r, w int32, errno int32)
TEXT runtime·pipe2(SB),NOSPLIT|NOFRAME,$0-20
MOVV $r+8(FP), R4
@@ -591,21 +582,6 @@ TEXT runtime·closeonexec(SB),NOSPLIT|NOFRAME,$0
SYSCALL
RET
-// func runtime·setNonblock(int32 fd)
-TEXT runtime·setNonblock(SB),NOSPLIT|NOFRAME,$0-4
- MOVW fd+0(FP), R4 // fd
- MOVV $3, R5 // F_GETFL
- MOVV $0, R6
- MOVV $SYS_fcntl, R11
- SYSCALL
- MOVW $0x800, R6 // O_NONBLOCK
- OR R4, R6
- MOVW fd+0(FP), R4 // fd
- MOVV $4, R5 // F_SETFL
- MOVV $SYS_fcntl, R11
- SYSCALL
- RET
-
// func sbrk0() uintptr
TEXT runtime·sbrk0(SB),NOSPLIT|NOFRAME,$0-8
// Implemented as brk(NULL).