From e3f623076134b8a2351de44a048e89f330263221 Mon Sep 17 00:00:00 2001 From: freemine Date: Mon, 25 Jan 2021 19:27:46 +0800 Subject: [PATCH] typo: value in semaphore_create --- src/os/src/darwin/darwinSemphone.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/src/darwin/darwinSemphone.c b/src/os/src/darwin/darwinSemphone.c index a9e470bd70..6df44a52b3 100644 --- a/src/os/src/darwin/darwinSemphone.c +++ b/src/os/src/darwin/darwinSemphone.c @@ -134,7 +134,7 @@ int tsem_init(tsem_t *sem, int pshared, unsigned int value) { errno = ENOMEM; return -1; } - kern_return_t ret = semaphore_create(sem_port, &p->sem, SYNC_POLICY_FIFO, 0); + kern_return_t ret = semaphore_create(sem_port, &p->sem, SYNC_POLICY_FIFO, value); if (ret != KERN_SUCCESS) { fprintf(stderr, "==%s[%d]%s():[%p]==semophore_create failed\n", basename(__FILE__), __LINE__, __func__, sem); // we fail-fast here, because we have less-doc about semaphore_create for the moment -- GitLab