WIP: Add non-recursive thread lock support for Windows ##util - #26302
WIP: Add non-recursive thread lock support for Windows ##util#26302randomjack94dev wants to merge 1 commit into
Conversation
b95a936 to
ad1ca1a
Compare
Use SRWLocks to handle non-recursive thread locks on Windows
4ad0401 to
f7d21a7
Compare
|
It doesn't seem to me like it's going to break something, but I am not entirely sure and you certainly have more experience in this regard than me. Any thoughts? I don't think I fully understand the purpose of r_w32 wrappers (targeting older versions of Windows?), so I have a question about those. As you can see, I added r_w32_SleepConditionVariableSRW in analogy with r_w32_SleepConditionVariableCS, but haven't done so for other SRWLock functions (as CS-functions which were already used for implementing locks are called without wrappers). But since SRW-locks require Vista/2008 CI w64-mingw build yields warnings about their implicit declaration. Should I also add r_w32 wrappers for SRWLock functions used in util/thread_lock.c? Any feedback is appreciated, thank you! |
Description
Use SRWLocks to handle non-recursive thread locks on Windows (as suggested by the TODO comment). We use a union of CRITICAL_SECTION and SRWLOCK tagged by 'recursive' boolean flag to cover both types of locks.