mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +12:00
atomic.cpp: improvements.
Reduced static memory amount for waitable atomics. Allow notifier to skip notifications if wait/notify masks don't overlap. Improve raw_notify to wake up the thread by its id, add thread_id arg. Add optional mask argument to notify_one() and notify_all().
This commit is contained in:
parent
b66628baca
commit
5248240e10
7 changed files with 418 additions and 249 deletions
|
@ -2090,7 +2090,7 @@ void spu_thread::do_dma_transfer(spu_thread* _this, const spu_mfc_cmd& args, u8*
|
|||
v &= ~wmask;
|
||||
});
|
||||
|
||||
bits->notify_all();
|
||||
bits->notify_all(wmask);
|
||||
|
||||
if (size == size0)
|
||||
{
|
||||
|
@ -2588,7 +2588,7 @@ bool spu_thread::do_putllc(const spu_mfc_cmd& args)
|
|||
return success;
|
||||
}())
|
||||
{
|
||||
vm::reservation_notifier(addr, 128).notify_all();
|
||||
vm::reservation_notifier(addr, 128).notify_all(-128);
|
||||
raddr = 0;
|
||||
perf0.reset();
|
||||
return true;
|
||||
|
@ -2683,7 +2683,7 @@ void spu_thread::do_putlluc(const spu_mfc_cmd& args)
|
|||
}
|
||||
|
||||
do_cell_atomic_128_store(addr, _ptr<spu_rdata_t>(args.lsa & 0x3ff80));
|
||||
vm::reservation_notifier(addr, 128).notify_all();
|
||||
vm::reservation_notifier(addr, 128).notify_all(-128);
|
||||
}
|
||||
|
||||
void spu_thread::do_mfc(bool wait)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue