mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-23 03:02:53 +01:00
PPU: minor fix for ppu_join_status::max
Don't treat it as special "invalid" value.
This commit is contained in:
parent
4e6934c9dc
commit
45389dca51
@ -78,7 +78,7 @@ void fmt_class_string<ppu_join_status>::format(std::string& out, u64 arg)
|
||||
case ppu_join_status::detached: return "detached";
|
||||
case ppu_join_status::zombie: return "zombie";
|
||||
case ppu_join_status::exited: return "exited";
|
||||
case ppu_join_status::max: return "invalid";
|
||||
case ppu_join_status::max: break;
|
||||
}
|
||||
|
||||
return unknown;
|
||||
|
@ -203,7 +203,7 @@ public:
|
||||
static void stack_pop_verbose(u32 addr, u32 size) noexcept;
|
||||
};
|
||||
|
||||
static_assert(ppu_join_status::max < ppu_join_status{ppu_thread::id_base});
|
||||
static_assert(ppu_join_status::max <= ppu_join_status{ppu_thread::id_base});
|
||||
|
||||
template<typename T, typename = void>
|
||||
struct ppu_gpr_cast_impl
|
||||
|
@ -60,7 +60,7 @@ void _sys_ppu_thread_exit(ppu_thread& ppu, u64 errorcode)
|
||||
status = ppu_join_status::exited;
|
||||
});
|
||||
|
||||
if (old_status > ppu_join_status::max)
|
||||
if (old_status >= ppu_join_status::max)
|
||||
{
|
||||
lv2_obj::append(idm::check_unlocked<named_thread<ppu_thread>>(static_cast<u32>(old_status)));
|
||||
}
|
||||
@ -114,7 +114,7 @@ error_code sys_ppu_thread_join(ppu_thread& ppu, u32 thread_id, vm::ptr<u64> vptr
|
||||
return CELL_ESRCH;
|
||||
}
|
||||
|
||||
if (value > ppu_join_status::max)
|
||||
if (value >= ppu_join_status::max)
|
||||
{
|
||||
return CELL_EINVAL;
|
||||
}
|
||||
@ -191,7 +191,7 @@ error_code sys_ppu_thread_detach(u32 thread_id)
|
||||
return CELL_EINVAL;
|
||||
}
|
||||
|
||||
if (value > ppu_join_status::max)
|
||||
if (value >= ppu_join_status::max)
|
||||
{
|
||||
return CELL_EBUSY;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user