mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 10:42:36 +01:00
sys_prx_.cpp: Fix RAII locks usage (without local variables they destroyed immediately after construction)
This commit is contained in:
parent
93552a5958
commit
762c106e19
@ -35,7 +35,7 @@ error_code sys_prx_load_module(ppu_thread& ppu, vm::cptr<char> path, u64 flags,
|
||||
{
|
||||
sysPrxForUser.warning("sys_prx_load_module(path=%s, flags=0x%x, pOpt=*0x%x)", path, flags, pOpt);
|
||||
|
||||
sys_lwmutex_locker(ppu, g_ppu_prx_lwm);
|
||||
sys_lwmutex_locker lock(ppu, g_ppu_prx_lwm);
|
||||
|
||||
return _sys_prx_load_module(path, flags, pOpt);
|
||||
}
|
||||
@ -44,7 +44,7 @@ error_code sys_prx_load_module_by_fd(ppu_thread& ppu, s32 fd, u64 offset, u64 fl
|
||||
{
|
||||
sysPrxForUser.warning("sys_prx_load_module_by_fd(fd=%d, offset=0x%x, flags=0x%x, pOpt=*0x%x)", fd, offset, flags, pOpt);
|
||||
|
||||
sys_lwmutex_locker(ppu, g_ppu_prx_lwm);
|
||||
sys_lwmutex_locker lock(ppu, g_ppu_prx_lwm);
|
||||
|
||||
return _sys_prx_load_module_by_fd(fd, offset, flags, pOpt);
|
||||
}
|
||||
@ -53,7 +53,7 @@ error_code sys_prx_load_module_on_memcontainer(ppu_thread& ppu, vm::cptr<char> p
|
||||
{
|
||||
sysPrxForUser.warning("sys_prx_load_module_on_memcontainer(path=%s, mem_ct=0x%x, flags=0x%x, pOpt=*0x%x)", path, mem_ct, flags, pOpt);
|
||||
|
||||
sys_lwmutex_locker(ppu, g_ppu_prx_lwm);
|
||||
sys_lwmutex_locker lock(ppu, g_ppu_prx_lwm);
|
||||
|
||||
return _sys_prx_load_module_on_memcontainer(path, mem_ct, flags, pOpt);
|
||||
}
|
||||
@ -62,7 +62,7 @@ error_code sys_prx_load_module_on_memcontainer_by_fd(ppu_thread& ppu, s32 fd, u6
|
||||
{
|
||||
sysPrxForUser.warning("sys_prx_load_module_on_memcontainer_by_fd(fd=%d, offset=0x%x, mem_ct=0x%x, flags=0x%x, pOpt=*0x%x)", fd, offset, mem_ct, flags, pOpt);
|
||||
|
||||
sys_lwmutex_locker(ppu, g_ppu_prx_lwm);
|
||||
sys_lwmutex_locker lock(ppu, g_ppu_prx_lwm);
|
||||
|
||||
return _sys_prx_load_module_on_memcontainer_by_fd(fd, offset, mem_ct, flags, pOpt);
|
||||
}
|
||||
@ -71,7 +71,7 @@ error_code sys_prx_load_module_list(ppu_thread& ppu, s32 count, vm::cpptr<char>
|
||||
{
|
||||
sysPrxForUser.todo("sys_prx_load_module_list(count=%d, path_list=**0x%x, flags=0x%x, pOpt=*0x%x, id_list=*0x%x)", count, path_list, flags, pOpt, id_list);
|
||||
|
||||
sys_lwmutex_locker(ppu, g_ppu_prx_lwm);
|
||||
sys_lwmutex_locker lock(ppu, g_ppu_prx_lwm);
|
||||
|
||||
return _sys_prx_load_module_list(count, convert_path_list(path_list, count), flags, pOpt, id_list);
|
||||
}
|
||||
@ -80,7 +80,7 @@ error_code sys_prx_load_module_list_on_memcontainer(ppu_thread& ppu, s32 count,
|
||||
{
|
||||
sysPrxForUser.todo("sys_prx_load_module_list_on_memcontainer(count=%d, path_list=**0x%x, mem_ct=0x%x, flags=0x%x, pOpt=*0x%x, id_list=*0x%x)", count, path_list, mem_ct, flags, pOpt, id_list);
|
||||
|
||||
sys_lwmutex_locker(ppu, g_ppu_prx_lwm);
|
||||
sys_lwmutex_locker lock(ppu, g_ppu_prx_lwm);
|
||||
|
||||
return _sys_prx_load_module_list_on_memcontainer(count, convert_path_list(path_list, count), mem_ct, flags, pOpt, id_list);
|
||||
}
|
||||
@ -94,7 +94,7 @@ error_code sys_prx_start_module(ppu_thread& ppu, u32 id, u32 args, vm::ptr<void>
|
||||
return CELL_EINVAL;
|
||||
}
|
||||
|
||||
sys_lwmutex_locker(ppu, g_ppu_prx_lwm);
|
||||
sys_lwmutex_locker lock(ppu, g_ppu_prx_lwm);
|
||||
|
||||
vm::var<sys_prx_start_stop_module_option_t> opt;
|
||||
opt->size = opt.size();
|
||||
@ -127,7 +127,7 @@ error_code sys_prx_stop_module(ppu_thread& ppu, u32 id, u32 args, vm::ptr<void>
|
||||
return CELL_EINVAL;
|
||||
}
|
||||
|
||||
sys_lwmutex_locker(ppu, g_ppu_prx_lwm);
|
||||
sys_lwmutex_locker lock(ppu, g_ppu_prx_lwm);
|
||||
|
||||
vm::var<sys_prx_start_stop_module_option_t> opt;
|
||||
opt->size = opt.size();
|
||||
@ -155,7 +155,7 @@ error_code sys_prx_unload_module(ppu_thread& ppu, u32 id, u64 flags, vm::ptr<sys
|
||||
{
|
||||
sysPrxForUser.warning("sys_prx_unload_module(id=0x%x, flags=0x%x, pOpt=*0x%x)", id, flags, pOpt);
|
||||
|
||||
sys_lwmutex_locker(ppu, g_ppu_prx_lwm);
|
||||
sys_lwmutex_locker lock(ppu, g_ppu_prx_lwm);
|
||||
|
||||
return _sys_prx_unload_module(id, flags, pOpt);
|
||||
}
|
||||
@ -164,7 +164,7 @@ error_code sys_prx_register_library(ppu_thread& ppu, vm::ptr<void> lib_entry)
|
||||
{
|
||||
sysPrxForUser.warning("sys_prx_register_library(lib_entry=*0x%x)", lib_entry);
|
||||
|
||||
sys_lwmutex_locker(ppu, g_ppu_prx_lwm);
|
||||
sys_lwmutex_locker lock(ppu, g_ppu_prx_lwm);
|
||||
|
||||
return _sys_prx_register_library(lib_entry);
|
||||
}
|
||||
@ -173,7 +173,7 @@ error_code sys_prx_unregister_library(ppu_thread& ppu, vm::ptr<void> lib_entry)
|
||||
{
|
||||
sysPrxForUser.warning("sys_prx_unregister_library(lib_entry=*0x%x)", lib_entry);
|
||||
|
||||
sys_lwmutex_locker(ppu, g_ppu_prx_lwm);
|
||||
sys_lwmutex_locker lock(ppu, g_ppu_prx_lwm);
|
||||
|
||||
return _sys_prx_unregister_library(lib_entry);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user