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

Function set_current_timer_slack

src/thread/prctl.rs:600–603  ·  view source on GitHub ↗
(value: Option<NonZeroU64>)

Source from the content-addressed store, hash-verified

598/// [`prctl(PR_SET_TIMERSLACK,…)`]: https://man7.org/linux/man-pages/man2/prctl.2.html
599#[inline]
600pub fn set_current_timer_slack(value: Option<NonZeroU64>) -> io::Result<()> {
601 let value = usize::try_from(value.map_or(0, NonZeroU64::get)).map_err(|_r| io::Errno::RANGE)?;
602 unsafe { prctl_2args(PR_SET_TIMERSLACK, value as *mut _) }.map(|_r| ())
603}
604
605//
606// PR_GET_NO_NEW_PRIVS/PR_SET_NO_NEW_PRIVS

Callers

nothing calls this directly

Calls 1

prctl_2argsFunction · 0.85

Tested by

no test coverage detected