From 2882786bf4cd779f166e9ced82a4da2ea0f8b1f9 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 7 Jun 2022 07:25:10 +0200 Subject: [PATCH] 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 Auto-Submit: Tobias Klauser Auto-Submit: Ian Lance Taylor Run-TryBot: Ian Lance Taylor Reviewed-by: Dmitri Shuralyov TryBot-Result: Gopher Robot --- src/runtime/defs_linux_loong64.go | 1 - src/runtime/sys_linux_loong64.s | 24 ------------------------ 2 files changed, 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). -- 2.48.1