mirror of
https://github.com/RGBCube/serenity
synced 2025-10-26 20:22:35 +00:00
The interrupts enabled check in the Kernel mutex is there so that we don't lock mutexes within a spinlock, because mutexes reenable interrupts and that will mess up the spinlock in more ways than one if the thread moves processors. This check is guarded behind a debug flag because it's too hard to fix all the problems at once, but we regressed and weren't even getting to init stage 2 with it enabled. With this commit, we get to stage 2 again. In early boot, there are no interrupts enabled and spinlocks used, so we can sort of kind of safely ignore the interrupt state. There might be a better solution with another boot state flag that checks whether APs are up (because they have interrupts enabled from the start) but that seems overkill. |
||
|---|---|---|
| .. | ||
| LockLocation.h | ||
| LockMode.h | ||
| LockRank.cpp | ||
| LockRank.h | ||
| Mutex.cpp | ||
| Mutex.h | ||
| MutexProtected.h | ||
| Spinlock.h | ||
| SpinlockProtected.h | ||