mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:47:44 +00:00
Kernel: Verify interrupts are disabled when interacting with Mutexes
This should help prevent deadlocks where a thread blocks on a Mutex while interrupts are disabled, and makes it impossible for the holder of the Mutex to make forward progress because it cannot be scheduled in. Hide it behind a new debug macro LOCK_IN_CRITICAL_DEBUG for now, because Ext2FS takes a series of Mutexes from the page fault handler, which executes with interrupts disabled.
This commit is contained in:
parent
4f2520674c
commit
72de228695
3 changed files with 11 additions and 0 deletions
|
@ -166,6 +166,10 @@
|
|||
#cmakedefine01 LOCK_DEBUG
|
||||
#endif
|
||||
|
||||
#ifndef LOCK_IN_CRITICAL_DEBUG
|
||||
#cmakedefine01 LOCK_IN_CRITICAL_DEBUG
|
||||
#endif
|
||||
|
||||
#ifndef LOCK_RESTORE_DEBUG
|
||||
#cmakedefine01 LOCK_RESTORE_DEBUG
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue