mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Rename Memory::Lock() to Core_LockAgainstShutdown(), move it to Core
It stopped being about memory when CPU_Shutdown started holding it across the whole teardown - it's what keeps kernel objects, the symbol map and the memory map from being freed while another thread reads them. The old name invited the reading that it locks memory *access*, which it has never done. Memory::Reinit() now holds it across both halves rather than relying on Memory::Shutdown()'s own acquire: between Shutdown() and Init() there is no memory map at all, and a reader could slip into that gap. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01GZq8ZtJmFY7bkX5FVkr3P9
This commit is contained in:
1 parent
f57a102027
commit
75ff0d406c
16 files changed
+76
-66
No files matched your search
@@ -730,7 +730,7 @@ void CDisasm::Show(bool bShow, bool includeToTop) {
|
||||
// thread - hold g_frameMutex for the duration of the read, which NativeFrame() also
|
||||
// holds while it's actually touching that state. See g_frameMutex in Core.h.
|
||||
std::lock_guard<std::mutex> frameGuard(g_frameMutex);
|
||||
Memory::MemoryInitedLock memLock = Memory::Lock();
|
||||
CoreShutdownLock coreLock = Core_LockAgainstShutdown();
|
||||
g_symbolMap->FillSymbolListBox(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST), ST_FUNCTION);
|
||||
deferredSymbolFill_ = false;
|
||||
}
|
||||
@@ -741,7 +741,7 @@ void CDisasm::Show(bool bShow, bool includeToTop) {
|
||||
void CDisasm::NotifyMapLoaded() {
|
||||
if (m_bShowState != SW_HIDE && g_symbolMap) {
|
||||
std::lock_guard<std::mutex> frameGuard(g_frameMutex);
|
||||
Memory::MemoryInitedLock memLock = Memory::Lock();
|
||||
CoreShutdownLock coreLock = Core_LockAgainstShutdown();
|
||||
g_symbolMap->FillSymbolListBox(GetDlgItem(m_hDlg, IDC_FUNCTIONLIST), ST_FUNCTION);
|
||||
} else {
|
||||
deferredSymbolFill_ = true;
|
||||
|
||||
Reference in new issue
Block a user