mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 16:31:28 +12:00
Revert "Remove shared_cond
and simplify reservation waiting"
This reverts commit 0a96497e13
.
This commit is contained in:
parent
c9170bbb88
commit
b70c08a2e8
7 changed files with 349 additions and 3 deletions
|
@ -17,6 +17,8 @@
|
|||
#include <thread>
|
||||
#include <deque>
|
||||
|
||||
static_assert(sizeof(shared_cond) == 8, "Unexpected size of shared_cond");
|
||||
|
||||
namespace vm
|
||||
{
|
||||
static u8* memory_reserve_4GiB(std::uintptr_t _addr = 0)
|
||||
|
@ -48,6 +50,9 @@ namespace vm
|
|||
// Reservation stats (compressed x16)
|
||||
u8* const g_reservations = memory_reserve_4GiB((std::uintptr_t)g_stat_addr);
|
||||
|
||||
// Reservation sync variables
|
||||
u8* const g_reservations2 = g_reservations + 0x10000000;
|
||||
|
||||
// Memory locations
|
||||
std::vector<std::shared_ptr<block_t>> g_locations;
|
||||
|
||||
|
@ -629,9 +634,11 @@ namespace vm
|
|||
if (addr == 0x10000)
|
||||
{
|
||||
utils::memory_commit(g_reservations, 0x1000);
|
||||
utils::memory_commit(g_reservations2, 0x1000);
|
||||
}
|
||||
|
||||
utils::memory_commit(g_reservations + addr / 16, size / 16);
|
||||
utils::memory_commit(g_reservations2 + addr / 16, size / 16);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -639,10 +646,12 @@ namespace vm
|
|||
for (u32 i = 0; i < 6; i++)
|
||||
{
|
||||
utils::memory_commit(g_reservations + addr / 16 + i * 0x10000, 0x4000);
|
||||
utils::memory_commit(g_reservations2 + addr / 16 + i * 0x10000, 0x4000);
|
||||
}
|
||||
|
||||
// End of the address space
|
||||
utils::memory_commit(g_reservations + 0xfff0000, 0x10000);
|
||||
utils::memory_commit(g_reservations2 + 0xfff0000, 0x10000);
|
||||
}
|
||||
|
||||
if (flags & 0x100)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue