mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-11 01:22:43 +02:00
LibSync: Abstract away Mutex implementation
This commit adds in-place pimpl to abstract away the implementation of Mutex. It also adds policies to configure the type of mutex desired. Because of the tight integration between mutex and condition variables they also needed to be reworked and the changes have to be in one commit to retain atomicity. A win32 and pthread implemenation is provided to make sure the api works with both.
This commit is contained in:
Notes:
github-actions[bot]
2026-05-08 23:59:46 +00:00
Author: https://github.com/R-Goc Commit: https://github.com/LadybirdBrowser/ladybird/commit/50be9493d2e Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6537 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/Zaggy1024 ✅ Reviewed-by: https://github.com/gmta
@@ -271,7 +271,7 @@ struct ThreadData {
|
||||
s_thread_data.remove(s_thread_id);
|
||||
}
|
||||
|
||||
Sync::Mutex mutex;
|
||||
Sync::RecursiveMutex mutex;
|
||||
|
||||
// Each thread has its own timers, notifiers and a wake pipe.
|
||||
TimeoutSet timeouts;
|
||||
|
||||
Reference in New Issue
Block a user