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:
R-Goc
2025-10-30 18:32:03 +01:00
committed by Gregory Bertilson
parent 02bb892d7a
commit 50be9493d2
Notes: github-actions[bot] 2026-05-08 23:59:46 +00:00
14 changed files with 543 additions and 101 deletions

View File

@@ -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;