rustix::process

Function sched_getaffinity

source
pub fn sched_getaffinity(pid: Option<Pid>) -> Result<CpuSet>
Expand description

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