return true;
}
- if ((req_flags & TRP_POLICY) && cur_trp.trp_pol != cur_trp.trp_pol) {
+ if ((req_flags & TRP_POLICY) && req_trp.trp_pol != cur_trp.trp_pol) {
return true;
}
return fixedpri_rv;
}
+
return 0;
}
*/
wq->wq_creator = uth = workq_pop_idle_thread(wq, UT_WORKQ_OVERCOMMIT,
&needs_wakeup);
- if (workq_thread_needs_priority_change(req, uth)) {
- workq_thread_reset_pri(wq, uth, req, /*unpark*/ true);
- }
+ /* Always reset the priorities on the newly chosen creator */
+ workq_thread_reset_pri(wq, uth, req, /*unpark*/ true);
workq_turnstile_update_inheritor(wq, uth->uu_thread,
TURNSTILE_INHERITOR_THREAD);
WQ_TRACE_WQ(TRACE_wq_creator_select | DBG_FUNC_NONE,
workq_thread_reset_pri(wq, uth, req, /*unpark*/ true);
+ thread_unfreeze_base_pri(uth->uu_thread);
+#if 0 // <rdar://problem/55259863> to turn this back on
if (__improbable(thread_unfreeze_base_pri(uth->uu_thread) && !is_creator)) {
if (req_ts) {
workq_perform_turnstile_operation_locked(wq, ^{
WQ_TRACE_WQ(TRACE_wq_select_threadreq | DBG_FUNC_NONE, wq, 3, 0, 0, 0);
goto park_thawed;
}
+#endif
/*
* We passed all checks, dequeue the request, bind to it, and set it up
park:
thread_unfreeze_base_pri(uth->uu_thread);
+#if 0 // <rdar://problem/55259863>
park_thawed:
+#endif
workq_park_and_unlock(p, wq, uth, setup_flags);
}