processor_set_max_priorityis used to set the maximum priority for a processor set. The priority of a processor set is used only for newly created threads (thread's maximum priority is set to processor set's) and the assignment of threads to the set (thread's maximum priority is reduced if it exceeds the set's maximum priority, thread's priority is similarly reduced).
processor_set_max_prioritychanges this priority. It also sets the maximum priority of all threads assigned to the processor set to this new priority if change_threads is
TRUE. If this maximum priority is less than the priorities of any of these threads, their priorities will also be set to this new value.
This function returns
KERN_SUCCESSif the call succeeded and
KERN_INVALID_ARGUMENTif processor_set is not a processor set or priority is not a valid priority.