(pid: Pid, scope: CoreSchedulingScope)
| 1095 | /// [`prctl(PR_SCHED_CORE,PR_SCHED_CORE_SHARE_TO,…)`]: https://www.kernel.org/doc/html/v6.13/admin-guide/hw-vuln/core-scheduling.html |
| 1096 | #[inline] |
| 1097 | pub fn push_core_scheduling_cookie(pid: Pid, scope: CoreSchedulingScope) -> io::Result<()> { |
| 1098 | unsafe { |
| 1099 | syscalls::prctl( |
| 1100 | PR_SCHED_CORE, |
| 1101 | PR_SCHED_CORE_SHARE_TO as *mut _, |
| 1102 | pid.as_raw_nonzero().get() as usize as *mut _, |
| 1103 | scope as usize as *mut _, |
| 1104 | ptr::null_mut(), |
| 1105 | ) |
| 1106 | .map(|_r| ()) |
| 1107 | } |
| 1108 | } |
| 1109 | |
| 1110 | const PR_SCHED_CORE_SHARE_FROM: usize = 3; |
| 1111 |
nothing calls this directly
no test coverage detected