Next: , Previous: Tasks and Threads on Sets, Up: Processor Set Interface


9.1.6 Processor Set Priority

— Function: kern_return_t processor_set_max_priority (processor_set_t processor_set, int max_priority, boolean_t change_threads)

The function processor_set_max_priority is 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_priority changes 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_SUCCESS if the call succeeded and KERN_INVALID_ARGUMENT if processor_set is not a processor set or priority is not a valid priority.