mirror of
https://github.com/python/cpython.git
synced 2025-10-14 18:59:46 +00:00
gh-104530: Enable native Win32 condition variables by default (GH-104531)
This commit is contained in:
parent
d29f57f603
commit
b3f0b698da
6 changed files with 41 additions and 35 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue