Function rustix::process::sched_getaffinity

pub fn sched_getaffinity(pid: Option<Pid>) -> io::Result<CpuSet>
Documentation

sched_getaffinity(pid)—Get a thread’s CPU affinity mask.

pid is the thread ID to check. If pid is None, then the current thread is checked.

Returns the set of CPUs on which the thread is eligible to run.

References