diff options
| author | Tobias Klauser <tklauser@distanz.ch> | 2022-03-08 14:55:26 +0100 |
|---|---|---|
| committer | Tobias Klauser <tobias.klauser@gmail.com> | 2022-03-08 21:16:53 +0000 |
| commit | c3c74777bc5dcd351af6dc4811011241efe07d21 (patch) | |
| tree | da8b0339061abe43f3d2c3663e50959c7832a6ac /src/syscall | |
| parent | 085ef537c4a2c57d373e72f4a110d9fae9a287be (diff) | |
| download | go-c3c74777bc5dcd351af6dc4811011241efe07d21.tar.xz | |
runtime, syscall: implement syscall.Pipe using syscall.Pipe2 on solaris
All other platforms providing the pipe2 syscall already implement it
that way. Do so as well on solaris, which allows to drop
runtime.syscall_pipe and its dependencies as well.
Change-Id: Icf04777f21d1804da74325d173fefdc87caa42eb
Reviewed-on: https://go-review.googlesource.com/c/go/+/390716
Trust: Tobias Klauser <tobias.klauser@gmail.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Trust: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/syscall')
| -rw-r--r-- | src/syscall/asm_solaris_amd64.s | 3 | ||||
| -rw-r--r-- | src/syscall/syscall_solaris.go | 14 |
2 files changed, 1 insertions, 16 deletions
diff --git a/src/syscall/asm_solaris_amd64.s b/src/syscall/asm_solaris_amd64.s index c61e04a42f..3672d3667f 100644 --- a/src/syscall/asm_solaris_amd64.s +++ b/src/syscall/asm_solaris_amd64.s @@ -48,9 +48,6 @@ TEXT ·getpid(SB),NOSPLIT,$0 TEXT ·ioctl(SB),NOSPLIT,$0 JMP runtime·syscall_ioctl(SB) -TEXT ·pipe(SB),NOSPLIT,$0 - JMP runtime·syscall_pipe(SB) - TEXT ·RawSyscall(SB),NOSPLIT,$0 JMP runtime·syscall_rawsyscall(SB) diff --git a/src/syscall/syscall_solaris.go b/src/syscall/syscall_solaris.go index 3c50343d84..d01070b2ec 100644 --- a/src/syscall/syscall_solaris.go +++ b/src/syscall/syscall_solaris.go @@ -47,20 +47,8 @@ func direntNamlen(buf []byte) (uint64, bool) { return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true } -func pipe() (r uintptr, w uintptr, err uintptr) - func Pipe(p []int) (err error) { - if len(p) != 2 { - return EINVAL - } - r0, w0, e1 := pipe() - if e1 != 0 { - err = Errno(e1) - } - if err == nil { - p[0], p[1] = int(r0), int(w0) - } - return + return Pipe2(p, 0) } //sysnb pipe2(p *[2]_C_int, flags int) (err error) |
