mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-27 20:36:31 -04:00
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:
committed by
Ian Lance Taylor
parent
7f918dd405
commit
5a8c7f28c1
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user