Fix #6066, #6045: Disable spincount by default.

This commit is contained in:
Armin Novak
2020-04-13 09:38:36 +02:00
parent 3ee0cc6b70
commit a161bafa5f
2 changed files with 4 additions and 8 deletions

View File

@@ -46,6 +46,10 @@ include(CheckCCompilerFlag)
include(GNUInstallDirsWrapper)
include(CMakePackageConfigHelpers)
if (NOT WIN32)
add_definitions(-DWINPR_CRITICAL_SECTION_DISABLE_SPINCOUNT)
endif()
# Soname versioning
set(RAW_VERSION_STRING "3.0.0-dev")
if(EXISTS "${CMAKE_SOURCE_DIR}/.source_tag")

View File

@@ -125,14 +125,6 @@ extern "C"
/* Critical Section */
#if defined(__linux__)
/**
* Linux NPTL thread synchronization primitives are implemented using
* the futex system calls ... we can't beat futex with a spin loop.
*/
#define WINPR_CRITICAL_SECTION_DISABLE_SPINCOUNT
#endif
typedef struct _RTL_CRITICAL_SECTION
{
PVOID DebugInfo;