---@meta posix.poll

---@class posix_poll_events*
---@field IN? boolean
---@field PRI? boolean
---@field OUT? boolean
---@field ERR? boolean
---@field HUP? boolean
---@field NVAL? boolean

---@class posix_poll_fd*
---@field events posix_poll_events*
---@field revents? posix_poll_events*

---@alias posix_poll_fds table<integer, posix_poll_fd*>

---@class posix_poll*
---@field version string
---@type posix_poll*
local M = {}

---@param fds posix_poll_fds
---@param timeout? integer
---@return integer? count
---@return string? errMsg
---@return integer? errno
function M.poll(fds, timeout) end

---@param fd integer
---@param timeout integer
---@return integer? count
---@return string? errMsg
---@return integer? errno
function M.rpoll(fd, timeout) end

return M
