diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/zix/sem.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zix/sem.h b/src/zix/sem.h index a7cb826..1fea796 100644 --- a/src/zix/sem.h +++ b/src/zix/sem.h @@ -104,9 +104,9 @@ struct ZixSemImpl { }; static inline ZixStatus -zix_sem_init(ZixSem* sem, unsigned initial) +zix_sem_init(ZixSem* sem, unsigned val) { - return semaphore_create(mach_task_self(), &sem->sem, SYNC_POLICY_FIFO, 0) + return semaphore_create(mach_task_self(), &sem->sem, SYNC_POLICY_FIFO, val) ? ZIX_STATUS_ERROR : ZIX_STATUS_SUCCESS; } |