mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-11 10:40:58 +02:00
PPCSymbolDB: Rename m_write_lock to m_mutex
This mutex needs to be locked both when reading and writing, not just when writing.
This commit is contained in:
@@ -136,7 +136,7 @@ void PPCSymbolDB::DetermineNoteLayers()
|
||||
|
||||
Common::Symbol* PPCSymbolDB::GetSymbolFromAddr(u32 addr)
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(m_write_lock);
|
||||
std::lock_guard lock(m_mutex);
|
||||
if (m_functions.empty())
|
||||
return nullptr;
|
||||
|
||||
@@ -161,7 +161,7 @@ Common::Symbol* PPCSymbolDB::GetSymbolFromAddr(u32 addr)
|
||||
|
||||
Common::Note* PPCSymbolDB::GetNoteFromAddr(u32 addr)
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(m_write_lock);
|
||||
std::lock_guard lock(m_mutex);
|
||||
if (m_notes.empty())
|
||||
return nullptr;
|
||||
|
||||
@@ -209,7 +209,7 @@ std::string_view PPCSymbolDB::GetDescription(u32 addr)
|
||||
|
||||
void PPCSymbolDB::FillInCallers()
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(m_write_lock);
|
||||
std::lock_guard lock(m_mutex);
|
||||
|
||||
for (auto& p : m_functions)
|
||||
{
|
||||
@@ -312,7 +312,7 @@ bool PPCSymbolDB::FindMapFile(std::string* existing_map_file, std::string* writa
|
||||
// Returns true if m_functions was changed.
|
||||
bool PPCSymbolDB::LoadMapOnBoot(const Core::CPUThreadGuard& guard)
|
||||
{
|
||||
std::lock_guard lock(m_write_lock);
|
||||
std::lock_guard lock(m_mutex);
|
||||
|
||||
std::string existing_map_file;
|
||||
if (!PPCSymbolDB::FindMapFile(&existing_map_file, nullptr))
|
||||
|
@@ -51,5 +51,5 @@ public:
|
||||
static bool FindMapFile(std::string* existing_map_file, std::string* writable_map_file);
|
||||
|
||||
private:
|
||||
std::mutex m_write_lock;
|
||||
std::mutex m_mutex;
|
||||
};
|
||||
|
Reference in New Issue
Block a user