osfmk/man/thread_assign.html
Function - Assign a thread to a processor set.
**kern\_return\_t thread\_assign**** (thread\_act\_t **thread,** processor\_set\_t **processor\_set** );**
thread[in thread send right] The thread to be assigned.
processor_set[in processor-set-control send right] The control port for the processor set into which the thread is to be assigned.
The thread_assign function assigns thread to the set processor_set. After the assignment is completed, the thread executes only on processors that are assigned to that processor set. Any previous assignment of the thread is nullified.
Only generic errors apply.
Functions: thread_assign_default, thread_get_assignment, processor_set_create, processor_set_info, task_assign.