Commit graph

6 commits

Author SHA1 Message Date
Robert Müller 3d858c28ee Add CLock wrapper for std::mutex to replace lock_* functions
Replace usages of platform specific `lock_*` functions with `std::mutex` through the wrapper class `CLock`. Move lock classes to `base/lock.h`.

The `CLock` wrapper class is only necessary because the clang thread-safety attributes are not available for `std::mutex` except when explicitly using libc++.
2023-11-11 00:04:57 +01:00
Robert Müller ab42651dc7 Add test for the CSemaphore wrapper 2022-11-12 20:36:38 +01:00
def 281492c0fa Fix memory leak in Thread.Lock unit test 2021-01-22 19:18:25 +01:00
def 1e4890c499 More error checking in system.c (fixes #1317) 2019-03-19 23:16:29 +01:00
heinrich5991 c9fc487c43 Add a missing call to lock_wait in test function
This was uncovered when I tried to run other code with ThreadSan, but it
only found this. :(
2018-01-05 16:06:24 +01:00
heinrich5991 7de42a1414 Couple of thread fixes 2017-10-10 00:08:24 +02:00