mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-11 02:29:29 +00:00
Actually fix sys_rwlock_create
This commit is contained in:
parent
618d2c85ab
commit
63088515b4
1 changed files with 18 additions and 27 deletions
|
@ -10,8 +10,9 @@ s32 sys_rwlock_create(mem32_t rw_lock_id, mem_ptr_t<sys_rwlock_attribute_t> attr
|
||||||
{
|
{
|
||||||
sys_rwlock.Warning("sys_rwlock_create(rw_lock_id_addr=0x%x, attr_addr=0x%x)", rw_lock_id.GetAddr(), attr.GetAddr());
|
sys_rwlock.Warning("sys_rwlock_create(rw_lock_id_addr=0x%x, attr_addr=0x%x)", rw_lock_id.GetAddr(), attr.GetAddr());
|
||||||
|
|
||||||
if (attr)
|
if (!attr)
|
||||||
{
|
return CELL_EFAULT;
|
||||||
|
|
||||||
switch (attr->attr_protocol.ToBE())
|
switch (attr->attr_protocol.ToBE())
|
||||||
{
|
{
|
||||||
case se(attr->attr_protocol, SYS_SYNC_PRIORITY): sys_rwlock.Todo("SYS_SYNC_PRIORITY"); break;
|
case se(attr->attr_protocol, SYS_SYNC_PRIORITY): sys_rwlock.Todo("SYS_SYNC_PRIORITY"); break;
|
||||||
|
@ -31,16 +32,6 @@ s32 sys_rwlock_create(mem32_t rw_lock_id, mem_ptr_t<sys_rwlock_attribute_t> attr
|
||||||
|
|
||||||
sys_rwlock.Warning("*** rwlock created [%s] (protocol=0x%x): id = %d",
|
sys_rwlock.Warning("*** rwlock created [%s] (protocol=0x%x): id = %d",
|
||||||
std::string(attr->name, 8).c_str(), (u32)attr->attr_protocol, rw_lock_id.GetValue());
|
std::string(attr->name, 8).c_str(), (u32)attr->attr_protocol, rw_lock_id.GetValue());
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sys_rwlock.Todo("SYS_SYNC_PRIORITY");
|
|
||||||
|
|
||||||
rw_lock_id = sys_rwlock.GetNewId(new RWLock((u32)SYS_SYNC_PRIORITY, (u64)"default"));
|
|
||||||
|
|
||||||
sys_rwlock.Warning("*** rwlock created [%s] (protocol=0x%x): id = %d",
|
|
||||||
std::string("default", 8).c_str(), (u32)SYS_SYNC_PRIORITY, rw_lock_id.GetValue());
|
|
||||||
}
|
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue