(pid: Pid, scope: CoreSchedulingScope)
| 1073 | /// [`prctl(PR_SCHED_CORE,PR_SCHED_CORE_CREATE,…)`]: https://www.kernel.org/doc/html/v6.13/admin-guide/hw-vuln/core-scheduling.html |
| 1074 | #[inline] |
| 1075 | pub fn create_core_scheduling_cookie(pid: Pid, scope: CoreSchedulingScope) -> io::Result<()> { |
| 1076 | unsafe { |
| 1077 | syscalls::prctl( |
| 1078 | PR_SCHED_CORE, |
| 1079 | PR_SCHED_CORE_CREATE as *mut _, |
| 1080 | pid.as_raw_nonzero().get() as usize as *mut _, |
| 1081 | scope as usize as *mut _, |
| 1082 | ptr::null_mut(), |
| 1083 | ) |
| 1084 | .map(|_r| ()) |
| 1085 | } |
| 1086 | } |
| 1087 | |
| 1088 | const PR_SCHED_CORE_SHARE_TO: usize = 2; |
| 1089 |
nothing calls this directly
no test coverage detected