gh-104530: Enable native Win32 condition variables by default (GH-104531)

This commit is contained in:
Andrew Rogers 2024-02-02 13:50:51 +00:00 committed by GitHub
parent d29f57f603
commit b3f0b698da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 41 additions and 35 deletions

View file

@ -35,14 +35,14 @@
#include <windows.h> // CRITICAL_SECTION
/* options */
/* non-emulated condition variables are provided for those that want
* to target Windows Vista. Modify this macro to enable them.
/* emulated condition variables are provided for those that want
* to target Windows XP or earlier. Modify this macro to enable them.
*/
#ifndef _PY_EMULATED_WIN_CV
#define _PY_EMULATED_WIN_CV 1 /* use emulated condition variables */
#define _PY_EMULATED_WIN_CV 0 /* use non-emulated condition variables */
#endif
/* fall back to emulation if not targeting Vista */
/* fall back to emulation if targeting earlier than Vista */
#if !defined NTDDI_VISTA || NTDDI_VERSION < NTDDI_VISTA
#undef _PY_EMULATED_WIN_CV
#define _PY_EMULATED_WIN_CV 1
@ -77,7 +77,7 @@ typedef struct _PyCOND_T
#else /* !_PY_EMULATED_WIN_CV */
/* Use native Win7 primitives if build target is Win7 or higher */
/* Use native Windows primitives if build target is Vista or higher */
/* SRWLOCK is faster and better than CriticalSection */
typedef SRWLOCK PyMUTEX_T;