[redcode/crythread-2nd-pass] removed or replaced remaining CryMutex/CryLock usage with equivalent AZStd version

Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>
This commit is contained in:
AMZN-ScottR
2021-08-10 20:35:55 -07:00
parent 3bf4caf7d2
commit f99f1f00f4
15 changed files with 39 additions and 56 deletions
@@ -17,17 +17,17 @@ CSystemEventDispatcher::CSystemEventDispatcher()
bool CSystemEventDispatcher::RegisterListener(ISystemEventListener* pListener)
{
m_listenerRegistrationLock.Lock();
m_listenerRegistrationLock.lock();
bool ret = m_listeners.Add(pListener);
m_listenerRegistrationLock.Unlock();
m_listenerRegistrationLock.unlock();
return ret;
}
bool CSystemEventDispatcher::RemoveListener(ISystemEventListener* pListener)
{
m_listenerRegistrationLock.Lock();
m_listenerRegistrationLock.lock();
m_listeners.Remove(pListener);
m_listenerRegistrationLock.Unlock();
m_listenerRegistrationLock.unlock();
return true;
}
@@ -35,12 +35,12 @@ bool CSystemEventDispatcher::RemoveListener(ISystemEventListener* pListener)
//////////////////////////////////////////////////////////////////////////
void CSystemEventDispatcher::OnSystemEventAnyThread(ESystemEvent event, UINT_PTR wparam, UINT_PTR lparam)
{
m_listenerRegistrationLock.Lock();
m_listenerRegistrationLock.lock();
for (TSystemEventListeners::Notifier notifier(m_listeners); notifier.IsValid(); notifier.Next())
{
notifier->OnSystemEventAnyThread(event, wparam, lparam);
}
m_listenerRegistrationLock.Unlock();
m_listenerRegistrationLock.unlock();
}