mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 09:48:37 +12:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
85648da706
83 changed files with 4587 additions and 4103 deletions
|
@ -276,7 +276,7 @@ namespace vm
|
|||
return true;
|
||||
}
|
||||
|
||||
bool reservation_query(u32 addr, bool is_writing)
|
||||
bool reservation_query(u32 addr, u32 size, bool is_writing, std::function<bool()> callback)
|
||||
{
|
||||
std::lock_guard<reservation_mutex_t> lock(g_reservation_mutex);
|
||||
|
||||
|
@ -285,10 +285,18 @@ namespace vm
|
|||
return false;
|
||||
}
|
||||
|
||||
if (is_writing)
|
||||
// check if current reservation and address may overlap
|
||||
if (g_reservation_addr >> 12 == addr >> 12 && is_writing)
|
||||
{
|
||||
// break the reservation
|
||||
_reservation_break(addr);
|
||||
if (size && addr + size - 1 >= g_reservation_addr && g_reservation_addr + g_reservation_size - 1 >= addr)
|
||||
{
|
||||
// break the reservation if overlap
|
||||
_reservation_break(addr);
|
||||
}
|
||||
else
|
||||
{
|
||||
return callback(); //? true : _reservation_break(addr), true;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue