Forcefully awake waiters in sys_usbd_finalize

This is a no-op from cellUsbd side but happens on lv2 side as well.
This commit is contained in:
Eladash 2019-09-29 09:03:45 +03:00 committed by Ani
parent d90696be90
commit a1e7cdf1e9
1 changed files with 10 additions and 0 deletions

View File

@ -458,6 +458,16 @@ s32 sys_usbd_finalize(ppu_thread& ppu, u32 handle)
std::lock_guard lock(usbh->mutex);
usbh->is_init = false;
// Forcefully awake all waiters
for (auto& cpu : decltype(usbh->sq)(std::move(usbh->sq)))
{
// Special ternimation signal value
cpu->gpr[4] = 4;
cpu->gpr[5] = 0;
cpu->gpr[6] = 0;
lv2_obj::awake(cpu);
}
// TODO
return CELL_OK;
}