]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/mach_clock.c
xnu-517.tar.gz
[apple/xnu.git] / osfmk / kern / mach_clock.c
index c0b234c63cf281df69b767ae1245ef3b627cf0aa..accc3fe3d6dd80ec85183fa629ea8d27b312c333 100644 (file)
@@ -174,18 +174,14 @@ hertz_tick(
 #endif
        }
        else {
-               switch(processor_ptr[my_cpu]->state) {
+               TICKBUMP(&thread->system_timer);
 
-               case PROCESSOR_IDLE:
-                       TICKBUMP(&thread->system_timer);
+               state = processor_ptr[my_cpu]->state;
+               if (    state == PROCESSOR_IDLE                 ||
+                               state == PROCESSOR_DISPATCHING  )
                        state = CPU_STATE_IDLE;
-                       break;
-
-               default:
-                       TICKBUMP(&thread->system_timer);
+               else
                        state = CPU_STATE_SYSTEM;
-                       break;
-               }
 #if GPROF
                if (pv->active) {
                        if (state == CPU_STATE_SYSTEM)