Return the affinity of the process identified by pid (or the current process if zero). The affinity is returned as a set of CPU identifiers.
os/sched_getaffinity
sched_getaffinity