SMutex partially replaced with std::mutex

SPURecompiler.h: SETcc bug fixed
This commit is contained in:
Nekotekina 2014-06-20 15:00:36 +04:00
parent 237e7989b4
commit 90b9861043
21 changed files with 114 additions and 106 deletions

View file

@ -6,7 +6,6 @@
void EventManager::Init()
{
}
void EventManager::Clear()
@ -17,7 +16,7 @@ void EventManager::Clear()
bool EventManager::CheckKey(u64 key)
{
if (!key) return true;
SMutexLocker lock(m_lock);
std::lock_guard<std::mutex> lock(m_lock);
return key_map.find(key) != key_map.end();
}
@ -25,7 +24,7 @@ bool EventManager::CheckKey(u64 key)
bool EventManager::RegisterKey(EventQueue* data, u64 key)
{
if (!key) return true;
SMutexLocker lock(m_lock);
std::lock_guard<std::mutex> lock(m_lock);
if (key_map.find(key) != key_map.end()) return false;
@ -43,7 +42,7 @@ bool EventManager::GetEventQueue(u64 key, EventQueue*& data)
{
data = nullptr;
if (!key) return false;
SMutexLocker lock(m_lock);
std::lock_guard<std::mutex> lock(m_lock);
auto f = key_map.find(key);
if (f != key_map.end())
@ -57,7 +56,7 @@ bool EventManager::GetEventQueue(u64 key, EventQueue*& data)
bool EventManager::UnregisterKey(u64 key)
{
if (!key) return false;
SMutexLocker lock(m_lock);
std::lock_guard<std::mutex> lock(m_lock);
auto f = key_map.find(key);
if (f != key_map.end())
@ -71,7 +70,7 @@ bool EventManager::UnregisterKey(u64 key)
bool EventManager::SendEvent(u64 key, u64 source, u64 d1, u64 d2, u64 d3)
{
if (!key) return false;
SMutexLocker lock(m_lock);
std::lock_guard<std::mutex> lock(m_lock);
auto f = key_map.find(key);
if (f == key_map.end())