]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/i386/cpu.c
xnu-4570.71.2.tar.gz
[apple/xnu.git] / osfmk / i386 / cpu.c
index 7de91627ab7d41af5655a44ab93bd1a119b009b1..84cf0661559e8d8c9d0c8c6c1f2e97ef722af98e 100644 (file)
@@ -155,7 +155,7 @@ cpu_exit_wait(
         * a timeout if long-running interrupt were to occur here.
         */
        intrs_enabled = ml_set_interrupts_enabled(FALSE);
-       simple_lock(&x86_topo_lock);
+       mp_safe_spin_lock(&x86_topo_lock);
        /* Set a generous timeout of several seconds (in TSC ticks) */
        tsc_timeout = rdtsc64() + (10ULL * 1000 * 1000 * 1000);
        while ((cdp->lcpu.state != LCPU_HALT)
@@ -167,7 +167,7 @@ cpu_exit_wait(
            if (rdtsc64() > tsc_timeout)
                panic("cpu_exit_wait(%d) timeout", cpu);
            ml_set_interrupts_enabled(FALSE);
-           simple_lock(&x86_topo_lock);
+           mp_safe_spin_lock(&x86_topo_lock);
        }
        simple_unlock(&x86_topo_lock);
        ml_set_interrupts_enabled(intrs_enabled);