Zen API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kStatus kThread_SetAffinity ( kThread  thread,
kBitArray  affinity 
)

Sets the CPUs with which the thread should have affinity.

Affinity support is provided on a best-effort basis; if the OS refuses or further restricts the specified affinity configuration, it will not be reported as an error.

This method can be called before or after starting the thread.

Parameters
threadThread object.
affinityArray of CPUs with which this thread should have affinity (or kNULL or empty array to specify no affinity).
Returns
Operation status.
See also
kThread_CanSetAffinty