.direct_dispatch_to_idle_processors = FALSE,
.multiple_psets_enabled = TRUE,
.sched_groups_enabled = FALSE,
+ .avoid_processor_enabled = FALSE,
+ .thread_avoid_processor = NULL,
+ .processor_balance = sched_SMT_balance,
+
+ .rt_runq = sched_rtglobal_runq,
+ .rt_init = sched_rtglobal_init,
+ .rt_queue_shutdown = sched_rtglobal_queue_shutdown,
+ .rt_runq_scan = sched_rtglobal_runq_scan,
+ .rt_runq_count_sum = sched_rtglobal_runq_count_sum,
+
+ .qos_max_parallelism = sched_qos_max_parallelism,
+ .check_spill = sched_check_spill,
+ .ipi_policy = sched_ipi_policy,
+ .thread_should_yield = sched_thread_should_yield,
};
__attribute__((always_inline))
int priority,
boolean_t gte)
{
- int qpri = MAX(dualq_main_runq(processor)->highq, dualq_bound_runq(processor)->highq);
+ run_queue_t main_runq = dualq_main_runq(processor);
+ run_queue_t bound_runq = dualq_bound_runq(processor);
+
+ int qpri = MAX(main_runq->highq, bound_runq->highq);
if (gte)
return qpri >= priority;
while (rq->count > 0) {
thread = run_queue_dequeue(rq, SCHED_HEADQ);
- enqueue_tail(&tqueue, (queue_entry_t)thread);
+ enqueue_tail(&tqueue, &thread->runq_links);
}
pset_unlock(pset);
- while ((thread = (thread_t)(void*)dequeue_head(&tqueue)) != THREAD_NULL) {
+ qe_foreach_element_safe(thread, &tqueue, runq_links) {
+
+ remqueue(&thread->runq_links);
+
thread_lock(thread);
thread_setrun(thread, SCHED_TAILQ);