mirror of
https://github.com/rwinkhart/sys.git
synced 2026-09-01 14:47:28 -04:00
unix: add Poll function on OpenBSD
Tested with TestPoll extracted from syscall_linux_test.go. Once Poll is supported on all OSes this test can be moved to syscall_unix_test.go. Change-Id: Ic7ad2e749039e2e81612c2085d6fab73581d59f9 Reviewed-on: https://go-review.googlesource.com/73872 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
committed by
Tobias Klauser
parent
52c393dd0c
commit
b98136db33
@@ -102,6 +102,15 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
//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)
|
||||
}
|
||||
|
||||
/*
|
||||
* Exposed directly
|
||||
*/
|
||||
@@ -243,7 +252,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
|
||||
// nfssvc
|
||||
// nnpfspioctl
|
||||
// openat
|
||||
// poll
|
||||
// preadv
|
||||
// profil
|
||||
// pwritev
|
||||
|
||||
Reference in New Issue
Block a user