summaryrefslogtreecommitdiff
path: root/Kernel/Arch
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-01-29 01:47:18 +0200
committerAndreas Kling <kling@serenityos.org>2022-01-29 16:45:39 +0100
commite28af4a2fc2596502ab7d31bdd6d64a50abe6c5d (patch)
treeca2b39a7d76ba32fc844534acd51939be663855b /Kernel/Arch
parent60aa4152e946437eae0d44749558e6b2b848246c (diff)
downloadserenity-e28af4a2fc2596502ab7d31bdd6d64a50abe6c5d.zip
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.
Diffstat (limited to 'Kernel/Arch')
0 files changed, 0 insertions, 0 deletions