Lines Matching refs:priority
65 * Set scheduling policy & priority for thread.
71 integer_t priority)
115 if (priority >= thread->max_priority)
116 priority = thread->max_priority - thread->task_priority;
118 if (priority >= MINPRI_KERNEL)
119 priority -= MINPRI_KERNEL;
121 if (priority >= MINPRI_RESERVED)
122 priority -= MINPRI_RESERVED;
124 priority -= BASEPRI_DEFAULT;
126 priority += thread->task_priority;
128 if (priority > thread->max_priority)
129 priority = thread->max_priority;
131 if (priority < MINPRI)
132 priority = MINPRI;
137 thread->saved_importance = priority - thread->task_priority;
138 priority = MAXPRI_THROTTLE;
140 thread->importance = priority - thread->task_priority;
142 /* No one can have a base priority less than MAXPRI_THROTTLE */
143 if (priority < MAXPRI_THROTTLE)
144 priority = MAXPRI_THROTTLE;
146 thread->importance = priority - thread->task_priority;
150 set_priority(thread, priority);
306 * Set scheduling limits to base priority.
370 * new base priority will not exceed current limits.