mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-07 15:31:26 +12:00
Fix sys_ppu_thread_start error checking, fix rare bug in sys_ppu_thread_create
* Correct error code to EBUSY. * lv2_obj::awake was called even when EBSUY should be returned. * Fix sys_ppu_thread_create for a newly created thread with the same id as ppu_thread::id_base. (can happen if main thread exited before its creation)
This commit is contained in:
parent
c1dc6838fa
commit
dd6825a7bd
3 changed files with 23 additions and 15 deletions
|
@ -788,14 +788,11 @@ ppu_thread::ppu_thread(const ppu_thread_params& param, std::string_view name, u3
|
|||
|
||||
gpr[13] = param.tls_addr;
|
||||
|
||||
if (detached >= 0 && id != id_base)
|
||||
if (detached >= 0)
|
||||
{
|
||||
// Initialize thread entry point
|
||||
cmd_list
|
||||
({
|
||||
{ppu_cmd::set_args, 2}, param.arg0, param.arg1,
|
||||
{ppu_cmd::opd_call, 0}, std::bit_cast<u64>(entry_func),
|
||||
});
|
||||
// Initialize thread args
|
||||
gpr[3] = param.arg0;
|
||||
gpr[4] = param.arg1;
|
||||
}
|
||||
|
||||
// Trigger the scheduler
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue