Kernel: Allow recursion when writing to the debug log

This allows printing in the case e.g. a page fault happens
during a log statement
This commit is contained in:
Tom 2020-07-02 08:34:14 -06:00 committed by Andreas Kling
parent 3cc0e86cd8
commit a308b176ce
Notes: sideshowbarker 2024-07-19 05:12:46 +09:00

View file

@ -35,7 +35,9 @@
#include <LibC/stdarg.h>
static bool serial_debug;
static SpinLock s_log_lock;
// A recursive spinlock allows us to keep writing in the case where a
// page fault happens in the middle of a dbg(), klog(), etc
static RecursiveSpinLock s_log_lock;
void set_serial_debug(bool on_or_off)
{