pub fn poll(fds: []pollfd, timeout: i32) PollError!usize
pub fn poll(fds: []pollfd, timeout: i32) PollError!usize { if (native_os == .windows) { @compileError("use std.Io instead"); } while (true) { const fds_count = cast(nfds_t, fds.len) orelse return error.SystemResources; const rc = system.poll(fds.ptr, fds_count, timeout); switch (errno(rc)) { .SUCCESS => return @intCast(rc), .FAULT => unreachable, .INTR => continue, .INVAL => unreachable, .NOMEM => return error.SystemResources, else => |err| return unexpectedErrno(err), } } unreachable; }