Do not allow SYS_SYNC_PRIORITY_INHERIT in sys_semaphore_create (EINVAL)
This commit is contained in:
@@ -31,10 +31,7 @@ error_code sys_semaphore_create(ppu_thread& ppu, vm::ptr<u32> sem_id, vm::ptr<sy
|
|||||||
|
|
||||||
const u32 protocol = attr->protocol;
|
const u32 protocol = attr->protocol;
|
||||||
|
|
||||||
if (protocol == SYS_SYNC_PRIORITY_INHERIT)
|
if (protocol != SYS_SYNC_FIFO && protocol != SYS_SYNC_PRIORITY)
|
||||||
sys_semaphore.warning("sys_semaphore_create(): SYS_SYNC_PRIORITY_INHERIT");
|
|
||||||
|
|
||||||
if (protocol != SYS_SYNC_FIFO && protocol != SYS_SYNC_PRIORITY && protocol != SYS_SYNC_PRIORITY_INHERIT)
|
|
||||||
{
|
{
|
||||||
sys_semaphore.error("sys_semaphore_create(): unknown protocol (0x%x)", protocol);
|
sys_semaphore.error("sys_semaphore_create(): unknown protocol (0x%x)", protocol);
|
||||||
return CELL_EINVAL;
|
return CELL_EINVAL;
|
||||||
|
|||||||
Reference in New Issue
Block a user