434ac77b83
- Complete implementation including recursion support
- Added an intensive ctest (TestSynchCritical)
- Struct members are used exactly as Windows does it internally:
LockCount starts at -1, RecursionCount at 0
- Same performance optimizations as internally on Windows:
- Fast lock acquisition path using CAS -> SpinCount -> wait
- SpinCount automatically disabled on uniprocessor systems
- On Linux SpinCount is disabled because it provided no advantage over NPTL/futex in all tests
Support for CRITICAL_SECTION's DebugInfo is not yet included (but trivial to add).
(cherry picked from commit
|
||
---|---|---|
.. | ||
test | ||
address.c | ||
barrier.c | ||
CMakeLists.txt | ||
condition.c | ||
critical.c | ||
event.c | ||
init.c | ||
ModuleOptions.cmake | ||
mutex.c | ||
semaphore.c | ||
sleep.c | ||
srw.c | ||
synch.c | ||
synch.h | ||
timer.c | ||
wait.c |