mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
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:
parent
3cc0e86cd8
commit
a308b176ce
Notes:
sideshowbarker
2024-07-19 05:12:46 +09:00
Author: https://github.com/tomuta Commit: https://github.com/SerenityOS/serenity/commit/a308b176cef Pull-request: https://github.com/SerenityOS/serenity/pull/2683 Reviewed-by: https://github.com/awesomekling ✅
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue