MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / getrlimit

Function getrlimit

src/backend/linux_raw/process/syscalls.rs:200–212  ·  view source on GitHub ↗
(limit: Resource)

Source from the content-addressed store, hash-verified

198
199#[inline]
200pub(crate) fn getrlimit(limit: Resource) -> Rlimit {
201 let mut result = MaybeUninit::<rlimit64>::uninit();
202 unsafe {
203 ret_infallible(syscall!(
204 __NR_prlimit64,
205 c_uint(0),
206 limit,
207 null::<c::c_void>(),
208 &mut result
209 ));
210 rlimit_from_linux(result.assume_init())
211 }
212}
213
214#[inline]
215pub(crate) fn setrlimit(limit: Resource, new: Rlimit) -> io::Result<()> {

Callers

nothing calls this directly

Calls 3

rlimit_from_linuxFunction · 0.85
assume_initMethod · 0.80
ret_infallibleFunction · 0.50

Tested by

no test coverage detected