---@meta posix.sys.resource

---@class posix_rlimit*
---@field rlim_cur integer
---@field rlim_max integer

---@class posix_sys_resource*
---@field version string
---@field RLIM_INFINITY integer
---@field RLIM_SAVED_CUR integer
---@field RLIM_SAVED_MAX integer
---@field RLIMIT_CORE integer
---@field RLIMIT_CPU integer
---@field RLIMIT_DATA integer
---@field RLIMIT_FSIZE integer
---@field RLIMIT_NOFILE integer
---@field RLIMIT_STACK integer
---@field RLIMIT_AS integer
---@type posix_sys_resource*
local M = {}

---@param resource integer
---@return posix_rlimit*? limit
---@return string? errMsg
---@return integer? errno
function M.getrlimit(resource) end

---@param resource integer
---@param limit posix_rlimit*
---@return integer? ok
---@return string? errMsg
---@return integer? errno
function M.setrlimit(resource, limit) end

return M
