unix: add Ppoll support for linux

Use a shim for Poll on arm64.

Fixes golang/go#16052.

Change-Id: I929e7a2293561bddb9355bf65f98bc68b91905b2
Reviewed-on: https://go-review.googlesource.com/24062
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
kortschak
2016-06-14 16:43:59 +00:00
committed by Ian Lance Taylor
parent 7f918dd405
commit 5a8c7f28c1
28 changed files with 264 additions and 36 deletions
+9
View File
@@ -318,3 +318,12 @@ func Shutdown(s, how int) error {
}
return nil
}
//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
func Poll(fds []PollFd, timeout int) (n int, err error) {
if len(fds) == 0 {
return poll(nil, 0, timeout)
}
return poll(&fds[0], len(fds), timeout)
}