mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-04 03:35:19 +02: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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GZq8ZtJmFY7bkX5FVkr3P9
This commit is contained in:
co-authored by
Claude Opus 5
parent
f57a102027
commit
75ff0d406c
@@ -63,7 +63,7 @@ struct AutoDisabledReplacements {
|
||||
// by the time this is called, so nothing else can be concurrently executing MIPS code or touching the
|
||||
// JIT's emuhack ops on this thread while we hold onto them below.
|
||||
//
|
||||
// Deliberately does NOT take a Memory::MemoryInitedLock: memory teardown only ever happens on the
|
||||
// Deliberately does NOT take a CoreShutdownLock: memory teardown only ever happens on the
|
||||
// CPU thread too, so there's nothing to guard against, and taking it here deadlocked against the
|
||||
// Win32 debugger's paint handlers. See the lock ordering section in AGENTS.md.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user