summaryrefslogtreecommitdiff
path: root/Meta/CMake/all_the_debug_macros.cmake
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 /Meta/CMake/all_the_debug_macros.cmake
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 'Meta/CMake/all_the_debug_macros.cmake')
-rw-r--r--Meta/CMake/all_the_debug_macros.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Meta/CMake/all_the_debug_macros.cmake b/Meta/CMake/all_the_debug_macros.cmake
index abb8b61613..4ff054c51c 100644
--- a/Meta/CMake/all_the_debug_macros.cmake
+++ b/Meta/CMake/all_the_debug_macros.cmake
@@ -106,6 +106,7 @@ set(LOCK_DEBUG ON)
set(LOCK_IN_CRITICAL_DEBUG ON)
set(LOCK_RANK_ENFORCEMENT ON)
set(LOCK_RESTORE_DEBUG ON)
+set(LOCK_SHARED_UPGRADE_DEBUG ON)
set(LOCK_TRACE_DEBUG ON)
set(LOOKUPSERVER_DEBUG ON)
set(MALLOC_DEBUG ON)