mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-28 13:28:01 +03:00
vm: remove g_mutex, use g_range_lock instead
Simplification and performance improvements.
This commit is contained in:
parent
799c4837d3
commit
5c1f79ab26
9 changed files with 78 additions and 148 deletions
|
@ -1430,7 +1430,7 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
|
|||
return false;
|
||||
}
|
||||
|
||||
if (vm::reader_lock rlock; vm::check_addr(addr, 0))
|
||||
if (vm::writer_lock mlock; vm::check_addr(addr, 0))
|
||||
{
|
||||
// For allocated memory with protection lower than required (such as protection::no or read-only while writing to it)
|
||||
utils::memory_protect(vm::base(addr & -0x1000), 0x1000, utils::protection::rw);
|
||||
|
@ -1485,7 +1485,7 @@ bool handle_access_violation(u32 addr, bool is_writing, ucontext_t* context) noe
|
|||
|
||||
u64 data3;
|
||||
{
|
||||
vm::reader_lock rlock;
|
||||
vm::writer_lock rlock;
|
||||
if (vm::check_addr(addr, is_writing ? vm::page_writable : vm::page_readable))
|
||||
{
|
||||
// Memory was allocated inbetween, retry
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue