Fix sys_raw_spu_destroy

This commit is contained in:
Eladash 2020-03-15 08:10:33 +02:00 committed by Ivan
parent 33d01fd252
commit 9e14e835e7
2 changed files with 11 additions and 8 deletions

View file

@ -955,14 +955,15 @@ void spu_int_ctrl_t::set(u64 ints)
ints &= mask;
// notify if at least 1 bit was set
if (ints && ~stat.fetch_or(ints) & ints && !tag.expired())
if (ints && ~stat.fetch_or(ints) & ints)
{
reader_lock rlock(id_manager::g_mutex);
std::shared_lock rlock(id_manager::g_mutex);
if (const auto tag_ptr = tag.lock())
{
if (auto handler = tag_ptr->handler.lock())
{
rlock.unlock();
handler->exec();
}
}