unix: correct type for timeout argument to Select on linux/{arm64,mips64x}

Follow CL 70590 which did the same for syscall.

unix.Select uses SYS_PSELECT6 on arm64 and mipx64x, however this
syscall expects its 5th argument to be of type Timespec (with seconds
and nanoseconds) instead of type Timeval (with seconds and microseconds)
This leads to the timeout being too short by a factor of 1000.

This CL fixes this by adjusting the timeout argument accordingly,
similarly to how glibc does it for architectures where neither
SYS_SELECT nor SYS__NEWSELECT are available. It also makes Pselect
generaly available on linux.

Updates golang/go#22246

Change-Id: I69f8821a40c59ee469b8a986d784a4db8727ee9a
Reviewed-on: https://go-review.googlesource.com/70610
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
14 files changed
tree: 6e606e48cc69fcffb5bed840bbd32ecf3af6352d
  1. plan9/
  2. unix/
  3. windows/
  4. .gitattributes
  5. .gitignore
  6. AUTHORS
  7. codereview.cfg
  8. CONTRIBUTING.md
  9. CONTRIBUTORS
  10. LICENSE
  11. PATENTS
  12. README.md
README.md

sys

This repository holds supplemental Go packages for low-level interactions with the operating system.

Download/Install

The easiest way to install is to run go get -u golang.org/x/sys. You can also manually git clone the repository to $GOPATH/src/golang.org/x/sys.

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.

The main issue tracker for the sys repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/sys:” in the subject line, so it is easy to find.