From a72e415897a6cd585799504a9cb6d484ca5d2b1f Mon Sep 17 00:00:00 2001 From: Damiano <54273858+ienapliss@users.noreply.github.com> Date: Mon, 27 Jan 2020 00:15:10 +0100 Subject: [PATCH] for mingw --- src/nvthread/Mutex.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/nvthread/Mutex.cpp b/src/nvthread/Mutex.cpp index fe7fe68..569806c 100644 --- a/src/nvthread/Mutex.cpp +++ b/src/nvthread/Mutex.cpp @@ -2,15 +2,16 @@ #include "Mutex.h" -#if NV_OS_WIN32 -#include "Win32.h" - -#elif NV_OS_USE_PTHREAD +#if NV_OS_USE_PTHREAD #include #include // EBUSY +#elif NV_OS_WIN32 + +#include "Win32.h" + #endif // NV_OS #if NV_USE_TELEMETRY3 @@ -23,7 +24,7 @@ extern HTELEMETRY tmContext; using namespace nv; -#if NV_OS_WIN32 +#if NV_OS_WIN32 && !NV_OS_MINGW struct Mutex::Private { CRITICAL_SECTION mutex; @@ -53,7 +54,7 @@ void Mutex::lock() TmU64 matcher; tmTryLockEx(tmContext, &matcher, 100/*0.1 ms*/, __FILE__, __LINE__, this, "blocked"); #endif - + EnterCriticalSection(&m->mutex); #if NV_USE_TELEMETRY3