diff options
| author | Tobias Klauser <tklauser@distanz.ch> | 2022-10-03 20:00:43 +0200 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-10-07 16:48:35 +0000 |
| commit | cabf9fe4f2d7e5adfa7007e11f508b111d07a2f6 (patch) | |
| tree | 36b3aa2b6efda68e273f069701e7548d2291d863 /src/internal | |
| parent | d0b0b10b5cbb28d53403c2bd6af343581327e946 (diff) | |
| download | go-cabf9fe4f2d7e5adfa7007e11f508b111d07a2f6.tar.xz | |
internal/poll, net, syscall: enable writev on aix
aix supports iovec read/write, see
https://www.ibm.com/docs/en/aix/7.2?topic=w-write-writex-write64x-writev-writevx-ewrite-ewritev-pwrite-pwritev-subroutine
Define an unexported writev wrapper in package syscall (like on openbsd
and darwin) and linkname it from internal/poll.
Change-Id: I8f9695ceac72ae861afa3692207c154d86d4e690
Reviewed-on: https://go-review.googlesource.com/c/go/+/435260
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Diffstat (limited to 'src/internal')
| -rw-r--r-- | src/internal/poll/fd_writev_libc.go | 2 | ||||
| -rw-r--r-- | src/internal/poll/iovec_unix.go | 2 | ||||
| -rw-r--r-- | src/internal/poll/writev.go | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/internal/poll/fd_writev_libc.go b/src/internal/poll/fd_writev_libc.go index e427e62481..7d59e6b641 100644 --- a/src/internal/poll/fd_writev_libc.go +++ b/src/internal/poll/fd_writev_libc.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build darwin || (openbsd && !mips64) +//go:build aix || darwin || (openbsd && !mips64) package poll diff --git a/src/internal/poll/iovec_unix.go b/src/internal/poll/iovec_unix.go index c1500840ac..3f2833e728 100644 --- a/src/internal/poll/iovec_unix.go +++ b/src/internal/poll/iovec_unix.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd +//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd package poll diff --git a/src/internal/poll/writev.go b/src/internal/poll/writev.go index 4086c705fd..75c8b642b5 100644 --- a/src/internal/poll/writev.go +++ b/src/internal/poll/writev.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris +//go:build unix package poll @@ -30,8 +30,8 @@ func (fd *FD) Writev(v *[][]byte) (int64, error) { // 1024 and this seems conservative enough for now. Darwin's // UIO_MAXIOV also seems to be 1024. maxVec := 1024 - if runtime.GOOS == "solaris" { - // IOV_MAX is set to XOPEN_IOV_MAX on Solaris. + if runtime.GOOS == "aix" || runtime.GOOS == "solaris" { + // IOV_MAX is set to XOPEN_IOV_MAX on AIX and Solaris. maxVec = 16 } |
