Open frederick-vs-ja opened 1 year ago
I've taken a look at the code - it should be possible, as there shouldn't be any mix-and-match concerns from user code (as xlock.cpp
's state is static
). However, it must be done with great care, as the helper functions appear on the export surface. That is, the _Mtxinit
family is exported from msvcp140.dll
for our eternal nemesis, /clr:pure
. It should be possible to continue to export them (marked as unused and preserved for ABI) while xlock.cpp
switches to using SRWLOCK
.
Make sure that none of these mutexes are used as recursive
In #2317, MSVC STL dropped support for Windows Vista and make
SRWLOCK
unconditionally used formutex
. However, there're still some implementation details usingCRITICAL_SECTION
, all of which can be found inxlock.cpp
(viaxmtx.hpp
andxmtx.cpp
).It seems that switching to
SRWLOCK
doesn't affect ABI (as support for Vista has been dropped). Should we do this?