mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:07:46 +00:00
Kernel: Have Lock dump backtrace on lock-while-interrupts-disabled error.
This commit is contained in:
parent
dab9901235
commit
8c3ad802d8
1 changed files with 2 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
||||||
#include <AK/Types.h>
|
#include <AK/Types.h>
|
||||||
#include <Kernel/i386.h>
|
#include <Kernel/i386.h>
|
||||||
#include <Kernel/Scheduler.h>
|
#include <Kernel/Scheduler.h>
|
||||||
|
#include <Kernel/KSyms.h>
|
||||||
|
|
||||||
class Thread;
|
class Thread;
|
||||||
extern Thread* current;
|
extern Thread* current;
|
||||||
|
@ -52,6 +53,7 @@ private:
|
||||||
{
|
{
|
||||||
if (!are_interrupts_enabled()) {
|
if (!are_interrupts_enabled()) {
|
||||||
kprintf("Interrupts disabled when trying to take Lock{%s}\n", m_name);
|
kprintf("Interrupts disabled when trying to take Lock{%s}\n", m_name);
|
||||||
|
dump_backtrace(ksyms_ready);
|
||||||
hang();
|
hang();
|
||||||
}
|
}
|
||||||
ASSERT(!Scheduler::is_active());
|
ASSERT(!Scheduler::is_active());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue