]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove unused pipe and setNonblock on linux/loong64
authorTobias Klauser <tklauser@distanz.ch>
Tue, 7 Jun 2022 05:25:10 +0000 (07:25 +0200)
committerGopher Robot <gobot@golang.org>
Wed, 8 Jun 2022 01:54:08 +0000 (01:54 +0000)
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>

src/runtime/defs_linux_loong64.go
src/runtime/sys_linux_loong64.s

index 3e0fac02984ae1e7142a33b8a73a1d233d6df6e2..dda4009fb07b5d5e7ff71b49763bfac5cf7f25e1 100644 (file)
@@ -10,7 +10,6 @@ const (
        _EINTR  = 0x4
        _EAGAIN = 0xb
        _ENOMEM = 0xc
-       _ENOSYS = 0x26
 
        _PROT_NONE  = 0x0
        _PROT_READ  = 0x1
index 07628ba499758b7e394bf666775ff17367b24059..36a92df87cf6a55a8c483cde9b5038fa23109910 100644 (file)
@@ -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).