mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-21 09:49:01 +00: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:
parent
d62e21e7b6
commit
59d126d215
2 changed files with 5 additions and 5 deletions
|
@ -136,7 +136,7 @@ void PPCSymbolDB::DetermineNoteLayers()
|
||||||
|
|
||||||
Common::Symbol* PPCSymbolDB::GetSymbolFromAddr(u32 addr)
|
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())
|
if (m_functions.empty())
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ Common::Symbol* PPCSymbolDB::GetSymbolFromAddr(u32 addr)
|
||||||
|
|
||||||
Common::Note* PPCSymbolDB::GetNoteFromAddr(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())
|
if (m_notes.empty())
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ std::string_view PPCSymbolDB::GetDescription(u32 addr)
|
||||||
|
|
||||||
void PPCSymbolDB::FillInCallers()
|
void PPCSymbolDB::FillInCallers()
|
||||||
{
|
{
|
||||||
std::unique_lock<std::mutex> lock(m_write_lock);
|
std::lock_guard lock(m_mutex);
|
||||||
|
|
||||||
for (auto& p : m_functions)
|
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.
|
// Returns true if m_functions was changed.
|
||||||
bool PPCSymbolDB::LoadMapOnBoot(const Core::CPUThreadGuard& guard)
|
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;
|
std::string existing_map_file;
|
||||||
if (!PPCSymbolDB::FindMapFile(&existing_map_file, nullptr))
|
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);
|
static bool FindMapFile(std::string* existing_map_file, std::string* writable_map_file);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::mutex m_write_lock;
|
std::mutex m_mutex;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue