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
+4 -5
View File
@@ -60,13 +60,13 @@ func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
return openat(dirfd, path, flags|O_LARGEFILE, mode)
}
//sys poll(fds *PollFd, nfd int, timeout int) (n int, err error)
//sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
func Poll(fds []PollFd, timeout int) (n int, err error) {
func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
if len(fds) == 0 {
return poll(nil, 0, timeout)
return ppoll(nil, 0, timeout, sigmask)
}
return poll(&fds[0], len(fds), timeout)
return ppoll(&fds[0], len(fds), timeout, sigmask)
}
//sys readlinkat(dirfd int, path string, buf []byte) (n int, err error)
@@ -1052,7 +1052,6 @@ func Munmap(b []byte) (err error) {
// Newfstatat
// Nfsservctl
// Personality
// Ppoll
// Pselect6
// Ptrace
// Putpmsg