mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-15 09:40:05 +00:00
Fixes issues where the mutex is destroyed while an unlock is happening
This commit is contained in:
parent
483ee5e488
commit
7ebd3bbcbf
@ -1,4 +1,4 @@
|
||||
#include "stdafx.h"
|
||||
#include "stdafx.h"
|
||||
#include "Emu/Memory/vm.h"
|
||||
#include "Emu/System.h"
|
||||
#include "Emu/IdManager.h"
|
||||
@ -80,6 +80,8 @@ error_code sys_mutex_destroy(u32 mutex_id)
|
||||
|
||||
const auto mutex = idm::withdraw<lv2_obj, lv2_mutex>(mutex_id, [](lv2_mutex& mutex) -> CellError
|
||||
{
|
||||
std::lock_guard lock(mutex.mutex);
|
||||
|
||||
if (mutex.owner || mutex.lock_count)
|
||||
{
|
||||
return CELL_EBUSY;
|
||||
|
Loading…
x
Reference in New Issue
Block a user