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 2b25b4a52014d160aea370a7afba9aa1cff18c3f)