Some things improved

shared_mutex_t implemented
GUI Emu Callbacks rewritten
fxm::import, fxm::import_always implemented
cellMsgDialog rewritten
Emu.CallAfter improved (returns std::future)
This commit is contained in:
Nekotekina 2015-09-18 01:41:14 +03:00
parent 9d68c16c62
commit 8ae3401ffa
77 changed files with 1814 additions and 1831 deletions

View file

@ -1,35 +1,14 @@
#include "stdafx.h"
#include "IdManager.h"
namespace idm
{
std::mutex g_id_mutex;
std::mutex idm::g_mutex;
std::unordered_map<u32, id_data_t> g_id_map;
std::unordered_map<u32, id_data_t> idm::g_map;
thread_local u32 g_tls_last_id = 0xdeadbeef;
u32 idm::g_last_raw_id = 0;
u32 g_last_raw_id = 0;
thread_local u32 idm::g_tls_last_id = 0xdeadbeef;
void clear()
{
std::lock_guard<std::mutex> lock(g_id_mutex);
std::mutex fxm::g_mutex;
g_id_map.clear();
g_last_raw_id = 0;
}
}
namespace fxm
{
std::mutex g_fx_mutex;
std::unordered_map<std::type_index, std::shared_ptr<void>> g_fx_map;
void clear()
{
std::lock_guard<std::mutex> lock(g_fx_mutex);
g_fx_map.clear();
}
}
std::unordered_map<const void*, std::shared_ptr<void>> fxm::g_map;