mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-16 11:48:36 +12:00
Remove shared_cond
and simplify reservation waiting
Use atomic wait for reservations Cleanup some obsolete code
This commit is contained in:
parent
d13ff285d1
commit
0a96497e13
7 changed files with 4 additions and 537 deletions
|
@ -17,8 +17,6 @@
|
|||
#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)
|
||||
|
@ -50,9 +48,6 @@ 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;
|
||||
|
||||
|
@ -634,11 +629,9 @@ 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
|
||||
{
|
||||
|
@ -646,12 +639,10 @@ 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