mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:37:35 +00:00
Kernel: Add the ability to verify we don't kmalloc under spinlock.
Ideally we would never allocate under a spinlock, as it has many performance and potentially functionality (deadlock) pitfalls. We violate that rule in many places today, but we need a tool to track them all down and fix them. This change introduces a new macro option named `KMALLOC_VERIFY_NO_SPINLOCK_HELD` which can catch these situations at runtime via an assert.
This commit is contained in:
parent
6329e9fce6
commit
9c38475608
3 changed files with 18 additions and 0 deletions
|
@ -134,6 +134,10 @@
|
|||
#cmakedefine01 KMALLOC_DEBUG
|
||||
#endif
|
||||
|
||||
#ifndef KMALLOC_VERIFY_NO_SPINLOCK_HELD
|
||||
#cmakedefine01 KMALLOC_VERIFY_NO_SPINLOCK_HELD
|
||||
#endif
|
||||
|
||||
#ifndef LOCAL_SOCKET_DEBUG
|
||||
#cmakedefine01 LOCAL_SOCKET_DEBUG
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue