X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/7ddcb079202367355dddccdfa4318e57d50318be..c18c124eaa464aaaa5549e99e5a70fc9cbb50944:/pexpert/i386/pe_kprintf.c diff --git a/pexpert/i386/pe_kprintf.c b/pexpert/i386/pe_kprintf.c index 68d5fc2eb..3f655631b 100644 --- a/pexpert/i386/pe_kprintf.c +++ b/pexpert/i386/pe_kprintf.c @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -120,18 +121,15 @@ void kprintf(const char *fmt, ...) } /* - * Spin to get kprintf lock but re-enable interrupts while - * failing. - * This allows interrupts to be handled while waiting but - * interrupts are disabled once we have the lock. + * Spin to get kprintf lock but poll for incoming signals + * while interrupts are masked. */ state = ml_set_interrupts_enabled(FALSE); pal_preemption_assert(); while (!simple_lock_try(&kprintf_lock)) { - ml_set_interrupts_enabled(state); - ml_set_interrupts_enabled(FALSE); + (void) cpu_signal_handler(NULL); } if (cpu_number() != cpu_last_locked) {