Made panic() safe to use before the current thread has been set.

This commit is contained in:
Alex Smith 2012-06-27 15:07:45 +01:00
parent 575a67c7a1
commit 45e0e08aed

View File

@ -2066,7 +2066,8 @@ panic(const char* format, ...)
cpu_status state = disable_interrupts();
kernel_debugger_internal("PANIC: ", format, args, smp_get_current_cpu());
kernel_debugger_internal("PANIC: ", format, args,
thread_get_current_thread() ? smp_get_current_cpu() : 0);
restore_interrupts(state);