1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2026-01-16 16:30:59 +00:00
serenity/Kernel/Locking
Idan Horowitz e28af4a2fc Kernel: Stop using HashMap in Mutex
This commit removes the usage of HashMap in Mutex, thereby making Mutex
be allocation-free.

In order to achieve this several simplifications were made to Mutex,
removing unused code-paths and extra VERIFYs:
 * We no longer support 'upgrading' a shared lock holder to an
   exclusive holder when it is the only shared holder and it did not
   unlock the lock before relocking it as exclusive. NOTE: Unlike the
   rest of these changes, this scenario is not VERIFY-able in an
   allocation-free way, as a result the new LOCK_SHARED_UPGRADE_DEBUG
   debug flag was added, this flag lets Mutex allocate in order to
   detect such cases when debugging a deadlock.
 * We no longer support checking if a Mutex is locked by the current
   thread when the Mutex was not locked exclusively, the shared version
   of this check was not used anywhere.
 * We no longer support force unlocking/relocking a Mutex if the Mutex
   was not locked exclusively, the shared version of these functions
   was not used anywhere.
2022-01-29 16:45:39 +01:00
..
LockLocation.h Kernel: Add missing includes in Locking 2021-12-15 23:34:11 -08:00
LockMode.h Kernel: Add missing includes in Locking 2021-12-15 23:34:11 -08:00
LockRank.cpp Kernel: Add implied auto-specifiers in Locking 2021-12-15 23:34:11 -08:00
LockRank.h Kernel: Fix a typo in LockRank::Process's comment 2021-09-08 19:17:07 +03:00
Mutex.cpp Kernel: Stop using HashMap in Mutex 2022-01-29 16:45:39 +01:00
Mutex.h Kernel: Stop using HashMap in Mutex 2022-01-29 16:45:39 +01:00
MutexProtected.h Kernel: Simplify MutexProtected<T> 2021-08-22 03:34:09 +02:00
Spinlock.h Kernel: Move spinlock into Arch 2021-10-15 21:48:45 +01:00
SpinlockProtected.h Kernel: Rename ScopedSpinlock => SpinlockLocker 2021-08-22 03:34:10 +02:00