Changes the cast for WinAPI mutex (#3843)

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-09-01 09:47:53 -07:00
committed by GitHub
parent 82659f24e9
commit 451f267d58
@@ -198,7 +198,7 @@ namespace AZStd
AZ_FORCE_INLINE cv_status condition_variable_any::wait_for(Lock& lock, const chrono::duration<Rep, Period>& rel_time)
{
chrono::milliseconds toWait = rel_time;
EnterCriticalSection(static_cast<LPCRITICAL_SECTION>(&m_mutex));
EnterCriticalSection(AZ_STD_MUTEX_CAST(m_mutex));
lock.unlock();
// We need to make sure we use CriticalSection based mutex.
@@ -217,7 +217,7 @@ namespace AZStd
returnCode = cv_status::timeout;
}
}
LeaveCriticalSection(static_cast<LPCRITICAL_SECTION>(&m_mutex));
LeaveCriticalSection(AZ_STD_MUTEX_CAST(m_mutex));
lock.lock();
return returnCode;
}