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

Function pull_core_scheduling_cookie

src/thread/prctl.rs:1119–1130  ·  view source on GitHub ↗
(pid: Pid, scope: CoreSchedulingScope)

Source from the content-addressed store, hash-verified

1117/// [`prctl(PR_SCHED_CORE,PR_SCHED_CORE_SHARE_FROM,…)`]: https://www.kernel.org/doc/html/v6.13/admin-guide/hw-vuln/core-scheduling.html
1118#[inline]
1119pub fn pull_core_scheduling_cookie(pid: Pid, scope: CoreSchedulingScope) -> io::Result<()> {
1120 unsafe {
1121 syscalls::prctl(
1122 PR_SCHED_CORE,
1123 PR_SCHED_CORE_SHARE_FROM as *mut _,
1124 pid.as_raw_nonzero().get() as usize as *mut _,
1125 scope as usize as *mut _,
1126 ptr::null_mut(),
1127 )
1128 .map(|_r| ())
1129 }
1130}

Callers

nothing calls this directly

Calls 3

prctlFunction · 0.50
getMethod · 0.45
as_raw_nonzeroMethod · 0.45

Tested by

no test coverage detected