carb::thread::getAffinity

Defined in carb/thread/Util.h

inline CpuMaskVector carb::thread::getAffinity(NativeHandleType h)

Gets the current CPU Affinity for the thread.

On Windows each entry in the CpuMaskVector represents a Processor Group. On Linux, the CpuMaskVector is analagous to a cpu_set_t.

Parameters

h – The thread to get CPU Affinity for.

Returns

A CpuMaskVector containing the cpu affinities for the thread. If the underlyfing functions to get thread affinity return an error, the returned CpuMaskVector will be empty and errno or last-error will be set.