Do not allow SYS_SYNC_PRIORITY_INHERIT in sys_semaphore_create (EINVAL)

This commit is contained in:
Eladash 2019-08-18 00:40:04 +03:00 committed by Ivan
parent 960c8e6538
commit 62414cee15
1 changed files with 1 additions and 4 deletions

View File

@ -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;
if (protocol == SYS_SYNC_PRIORITY_INHERIT)
sys_semaphore.warning("sys_semaphore_create(): SYS_SYNC_PRIORITY_INHERIT");
if (protocol != SYS_SYNC_FIFO && protocol != SYS_SYNC_PRIORITY && protocol != SYS_SYNC_PRIORITY_INHERIT)
if (protocol != SYS_SYNC_FIFO && protocol != SYS_SYNC_PRIORITY)
{
sys_semaphore.error("sys_semaphore_create(): unknown protocol (0x%x)", protocol);
return CELL_EINVAL;