mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-08 16:01:42 +12:00
CELL: More efficient reservation notificatins
This commit is contained in:
parent
c71edc0719
commit
f948a80242
4 changed files with 42 additions and 18 deletions
|
@ -446,10 +446,10 @@ waitpkg_func static void __tpause(u32 cycles, u32 cstate)
|
|||
|
||||
static std::array<atomic_t<u8>, 128> g_resrv_waiters_count;
|
||||
|
||||
static inline atomic_t<u8>& get_resrv_waiters_count(u32 raddr)
|
||||
extern atomic_t<u8>& get_resrv_waiters_count(u32 raddr)
|
||||
{
|
||||
// Storage efficient method to distinguish different nearby addresses (which are likely)
|
||||
return g_resrv_waiters_count[std::popcount(raddr) + ((raddr / 128) % 4) * 32];
|
||||
return g_resrv_waiters_count[std::popcount(raddr & -512) + ((raddr / 128) % 4) * 32];
|
||||
}
|
||||
|
||||
void do_cell_atomic_128_store(u32 addr, const void* to_write);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue