Lines Matching refs:inheritor
182 turnstile_pi_inherit(turnstile_t *ts, kthread_t *inheritor, pri_t epri) in turnstile_pi_inherit() argument
184 ASSERT(THREAD_LOCK_HELD(inheritor)); in turnstile_pi_inherit()
187 if (epri <= inheritor->t_pri) in turnstile_pi_inherit()
191 ts->ts_inheritor = inheritor; in turnstile_pi_inherit()
193 disp_lock_enter_high(&inheritor->t_pi_lock); in turnstile_pi_inherit()
194 ts->ts_prioinv = inheritor->t_prioinv; in turnstile_pi_inherit()
195 inheritor->t_prioinv = ts; in turnstile_pi_inherit()
196 disp_lock_exit_high(&inheritor->t_pi_lock); in turnstile_pi_inherit()
202 ASSERT(ts->ts_inheritor == inheritor); in turnstile_pi_inherit()
207 if (epri > DISP_PRIO(inheritor)) in turnstile_pi_inherit()
208 thread_change_epri(inheritor, epri); in turnstile_pi_inherit()
216 turnstile_pi_tsdelete(turnstile_t *ts, kthread_t *inheritor) in turnstile_pi_tsdelete() argument
221 disp_lock_enter_high(&inheritor->t_pi_lock); in turnstile_pi_tsdelete()
222 tspp = &inheritor->t_prioinv; in turnstile_pi_tsdelete()
230 disp_lock_exit_high(&inheritor->t_pi_lock); in turnstile_pi_tsdelete()
242 kthread_t *inheritor = ts->ts_inheritor; in turnstile_pi_waive() local
245 ASSERT(inheritor == curthread); in turnstile_pi_waive()
247 thread_lock_high(inheritor); in turnstile_pi_waive()
248 new_epri = turnstile_pi_tsdelete(ts, inheritor); in turnstile_pi_waive()
249 if (new_epri != DISP_PRIO(inheritor)) in turnstile_pi_waive()
250 thread_change_epri(inheritor, new_epri); in turnstile_pi_waive()
252 if (DISP_MUST_SURRENDER(inheritor)) in turnstile_pi_waive()
253 cpu_surrender(inheritor); in turnstile_pi_waive()
254 thread_unlock_high(inheritor); in turnstile_pi_waive()
265 kthread_t *inheritor = curthread; in turnstile_pi_recalc() local
268 thread_lock(inheritor); in turnstile_pi_recalc()
269 new_epri = turnstile_pi_tsdelete(NULL, inheritor); in turnstile_pi_recalc()
270 if (new_epri != DISP_PRIO(inheritor)) in turnstile_pi_recalc()
271 thread_change_epri(inheritor, new_epri); in turnstile_pi_recalc()
272 if (DISP_MUST_SURRENDER(inheritor)) in turnstile_pi_recalc()
273 cpu_surrender(inheritor); in turnstile_pi_recalc()
274 thread_unlock(inheritor); in turnstile_pi_recalc()