]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/mach_clock.c
xnu-344.tar.gz
[apple/xnu.git] / osfmk / kern / mach_clock.c
index 09cba548c7807d3cfed989ff98fad287b6373350..1d922cac45ae7114c9dd55473edd0d33e4bdc15c 100644 (file)
@@ -133,7 +133,6 @@ hertz_tick(
        pc++;
 #endif /* lint */
 
-       mp_disable_preemption();
        my_cpu = cpu_number();
 
        /*
@@ -142,10 +141,8 @@ hertz_tick(
         *      especially when debugging, to wind up here with
         *      no thread to bill against.  So ignore the tick.
         */
-       if (thread == THREAD_NULL) {
-               mp_enable_preemption();
+       if (thread == THREAD_NULL)
                return;
-       }
 
 #if            MACH_PROF
        inkernel = !usermode && (pc < (unsigned int)ETEXT);
@@ -164,11 +161,9 @@ hertz_tick(
 
        if (usermode) {
                TICKBUMP(&thread->user_timer);
-#if 0
                if (thread->priority < BASEPRI_DEFAULT)
                        state = CPU_STATE_NICE;
                else
-#endif
                        state = CPU_STATE_USER;
 #if GPROF
                        if (pv->active)
@@ -211,7 +206,6 @@ hertz_tick(
        }
 
        machine_slot[my_cpu].cpu_ticks[state]++;
-       thread_quantum_update(my_cpu, thread, 1, state);
 
        /*
         * Hertz processing performed by the master-cpu
@@ -260,5 +254,4 @@ hertz_tick(
                        profile(pc, kernel_task->profil_buffer);
        }
 #endif /* MACH_PROF */
-       mp_enable_preemption();
 }