mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
Implement class cond_x16
Use as reservation notifier Limited to 16 threads but allows more precise control of contention
This commit is contained in:
parent
7f1cbb1136
commit
febe4d4a10
4 changed files with 243 additions and 8 deletions
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
class shared_mutex;
|
||||
class cpu_thread;
|
||||
class notifier;
|
||||
class cond_x16;
|
||||
|
||||
namespace vm
|
||||
{
|
||||
|
|
@ -105,9 +105,9 @@ namespace vm
|
|||
}
|
||||
|
||||
// Get reservation sync variable
|
||||
inline notifier& reservation_notifier(u32 addr, u32 size)
|
||||
inline cond_x16& reservation_notifier(u32 addr, u32 size)
|
||||
{
|
||||
return *reinterpret_cast<notifier*>(g_reservations2 + addr / 128 * 8);
|
||||
return *reinterpret_cast<cond_x16*>(g_reservations2 + addr / 128 * 8);
|
||||
}
|
||||
|
||||
void reservation_lock_internal(atomic_t<u64>&);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue