mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-20 22:05:12 +00:00
sys_event_queue: Fix ports disconnection after queue destruction
This commit is contained in:
parent
37110098c7
commit
2b75df22d9
5 changed files with 46 additions and 21 deletions
|
|
@ -1298,7 +1298,7 @@ error_code sys_spu_thread_group_connect_event(ppu_thread& ppu, u32 id, u32 eq, u
|
|||
|
||||
std::lock_guard lock(group->mutex);
|
||||
|
||||
if (!ep->expired())
|
||||
if (lv2_event_queue::check(*ep))
|
||||
{
|
||||
return CELL_EBUSY;
|
||||
}
|
||||
|
|
@ -1340,7 +1340,7 @@ error_code sys_spu_thread_group_disconnect_event(ppu_thread& ppu, u32 id, u32 et
|
|||
|
||||
std::lock_guard lock(group->mutex);
|
||||
|
||||
if (ep->expired())
|
||||
if (!lv2_event_queue::check(*ep))
|
||||
{
|
||||
return CELL_EINVAL;
|
||||
}
|
||||
|
|
@ -1373,7 +1373,7 @@ error_code sys_spu_thread_connect_event(ppu_thread& ppu, u32 id, u32 eq, u32 et,
|
|||
|
||||
auto& port = thread->spup[spup];
|
||||
|
||||
if (!port.expired())
|
||||
if (lv2_event_queue::check(port))
|
||||
{
|
||||
return CELL_EISCONN;
|
||||
}
|
||||
|
|
@ -1406,7 +1406,7 @@ error_code sys_spu_thread_disconnect_event(ppu_thread& ppu, u32 id, u32 et, u8 s
|
|||
|
||||
auto& port = thread->spup[spup];
|
||||
|
||||
if (port.expired())
|
||||
if (!lv2_event_queue::check(port))
|
||||
{
|
||||
return CELL_ENOTCONN;
|
||||
}
|
||||
|
|
@ -1546,7 +1546,7 @@ error_code sys_spu_thread_group_connect_event_all_threads(ppu_thread& ppu, u32 i
|
|||
{
|
||||
if (t)
|
||||
{
|
||||
if (!t->spup[port].expired())
|
||||
if (lv2_event_queue::check(t->spup[port]))
|
||||
{
|
||||
found = false;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue