mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-29 00:33:01 +00:00
Savestates: Fix saving sys_mutex_unlock
This commit is contained in:
parent
68718361a7
commit
d106934336
@ -274,6 +274,12 @@ error_code sys_mutex_unlock(ppu_thread& ppu, u32 mutex_id)
|
|||||||
|
|
||||||
if (auto cpu = mutex->reown<ppu_thread>())
|
if (auto cpu = mutex->reown<ppu_thread>())
|
||||||
{
|
{
|
||||||
|
if (cpu->state & cpu_flag::again)
|
||||||
|
{
|
||||||
|
ppu.state += cpu_flag::again;
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
mutex->awake(cpu);
|
mutex->awake(cpu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -134,6 +134,11 @@ struct lv2_mutex final : lv2_obj
|
|||||||
{
|
{
|
||||||
if (auto cpu = schedule<T>(sq, protocol))
|
if (auto cpu = schedule<T>(sq, protocol))
|
||||||
{
|
{
|
||||||
|
if (cpu->state & cpu_flag::again)
|
||||||
|
{
|
||||||
|
return static_cast<T*>(cpu);
|
||||||
|
}
|
||||||
|
|
||||||
owner = cpu->id << 1 | !sq.empty();
|
owner = cpu->id << 1 | !sq.empty();
|
||||||
return static_cast<T*>(cpu);
|
return static_cast<T*>(cpu);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user