pub fn sched_setaffinity(pid: Option<Pid>, cpuset: &CpuSet) -> Result<()>
Expand description
sched_setaffinity(pid, cpuset)
—Set a thread’s CPU affinity mask.
pid
is the thread ID to update. If pid is None
, then the current thread
is updated.
The CpuSet
argument specifies the set of CPUs on which the thread will be
eligible to run.
§References