]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/sched_traditional.c
xnu-4570.1.46.tar.gz
[apple/xnu.git] / osfmk / kern / sched_traditional.c
index 80f950feb6b9665f1f595a3d028ea61da7f360db..7bc3d43931095da6a224f5d92bda6b4a110c07da 100644 (file)
@@ -160,6 +160,20 @@ const struct sched_dispatch_table sched_traditional_dispatch = {
        .direct_dispatch_to_idle_processors             = TRUE,
        .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,
 };
 
 const struct sched_dispatch_table sched_traditional_with_pset_runqueue_dispatch = {
@@ -194,6 +208,20 @@ const struct sched_dispatch_table sched_traditional_with_pset_runqueue_dispatch
        .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,
 };
 
 static void
@@ -431,11 +459,7 @@ sched_traditional_processor_queue_has_priority(processor_t      processor,
                                                int              priority,
                                                boolean_t        gte)
 {
-       run_queue_t runq = runq_for_processor(processor);
-
-       if (runq->count == 0)
-               return FALSE;
-       else if (gte)
+       if (gte)
                return runq_for_processor(processor)->highq >= priority;
        else
                return runq_for_processor(processor)->highq > priority;