osfmk/man/task_get_assignment.html
Function - Return the processor set to which a task is assigned.
**kern\_return\_t task\_get\_assignment**** (task\_t **task,** processor\_set\_name\_t **processor\_set** );**
task[in task send right] The port for the task whose assignment is desired. processor_set[out processor-set-name send right] The name port for the processor set into which the task is assigned.
The task_get_assignment function returns the name port to the processor set to which task is currently assigned. This port can only be used to obtain information about the processor set.
Only generic errors apply.
Functions: task_assign, task_assign_default, processor_set_create, processor_set_info, thread_assign.