mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-01 03:32:07 +00:00
parent
7a3aa02dc1
commit
7db2e2537f
@ -179,7 +179,10 @@ error_code sys_event_queue_destroy(ppu_thread& ppu, u32 equeue_id, s32 mode)
|
||||
queue->append(cpu);
|
||||
}
|
||||
|
||||
lv2_obj::awake_all();
|
||||
if (!queue->sq.empty())
|
||||
{
|
||||
lv2_obj::awake_all();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -317,8 +317,11 @@ error_code sys_event_flag_set(u32 id, u64 bitptn)
|
||||
return false;
|
||||
});
|
||||
|
||||
flag->sq.erase(tail, flag->sq.end());
|
||||
lv2_obj::awake_all();
|
||||
if (tail != flag->sq.end())
|
||||
{
|
||||
flag->sq.erase(tail, flag->sq.end());
|
||||
lv2_obj::awake_all();
|
||||
}
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
@ -380,7 +383,10 @@ error_code sys_event_flag_cancel(ppu_thread& ppu, u32 id, vm::ptr<u32> num)
|
||||
flag->append(thread);
|
||||
}
|
||||
|
||||
lv2_obj::awake_all();
|
||||
if (value)
|
||||
{
|
||||
lv2_obj::awake_all();
|
||||
}
|
||||
}
|
||||
|
||||
if (ppu.test_stopped())
|
||||
|
@ -206,7 +206,10 @@ extern void network_thread_init()
|
||||
lv2_obj::append(ppu);
|
||||
}
|
||||
|
||||
lv2_obj::awake_all();
|
||||
if (!s_to_awake.empty())
|
||||
{
|
||||
lv2_obj::awake_all();
|
||||
}
|
||||
|
||||
s_to_awake.clear();
|
||||
socklist.clear();
|
||||
|
@ -237,12 +237,17 @@ error_code sys_semaphore_post(ppu_thread& ppu, u32 sem_id, s32 count)
|
||||
}
|
||||
|
||||
// Wake threads
|
||||
for (s32 i = std::min<s32>(-std::min<s32>(val, 0), count); i > 0; i--)
|
||||
const s32 to_awake = std::min<s32>(-std::min<s32>(val, 0), count);
|
||||
|
||||
for (s32 i = 0; i < to_awake; i++)
|
||||
{
|
||||
sem->append(verify(HERE, sem->schedule<ppu_thread>(sem->sq, sem->protocol)));
|
||||
}
|
||||
|
||||
lv2_obj::awake_all();
|
||||
if (to_awake > 0)
|
||||
{
|
||||
lv2_obj::awake_all();
|
||||
}
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user