pub fn sched_getaffinity(pid: Option<Pid>) -> Result<CpuSet>
sched_getaffinity(pid)—Get a thread’s CPU affinity mask.
sched_getaffinity(pid)
pid is the thread ID to check. If pid is None, then the current thread is checked.
pid
None
Returns the set of CPUs on which the thread is eligible to run.