fsapi: migrates PollRead to Poll with Pflag (#1599)

Signed-off-by: Adrian Cole <adrian@tetrate.io>
Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
Co-authored-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
This commit is contained in:
Crypt Keeper
2023-07-30 10:56:17 +08:00
committed by GitHub
parent 023a38349a
commit 8d3874d3c8
18 changed files with 243 additions and 50 deletions

View File

@@ -24,8 +24,8 @@ func newPollFd(fd uintptr, events, revents int16) pollFd {
// _POLLIN subscribes a notification when any readable data is available.
const _POLLIN = 0x0001
// poll implements poll on Darwin via the corresponding libc function.
func poll(fds []pollFd, timeoutMillis int32) (n int, errno sys.Errno) {
// _poll implements poll on Darwin via the corresponding libc function.
func _poll(fds []pollFd, timeoutMillis int32) (n int, errno sys.Errno) {
var fdptr *pollFd
nfds := len(fds)
if nfds > 0 {