From 932b7fc3b014a174c2e9ec69564a43201711d340 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 27 Jun 2011 13:44:23 +0200 Subject: [PATCH] do not hardcode 1 instead of using value (bug in a code branch dedicated to very old darwin boxes only) --- src/xbt/xbt_os_thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xbt/xbt_os_thread.c b/src/xbt/xbt_os_thread.c index b020ebd04e..b2be4c7fe6 100644 --- a/src/xbt/xbt_os_thread.c +++ b/src/xbt/xbt_os_thread.c @@ -495,7 +495,7 @@ xbt_os_sem_t xbt_os_sem_init(unsigned int value) if ((res->ps == (sem_t *) SEM_FAILED) && (errno == ENAMETOOLONG)) { /* Old darwins only allow 13 chars. Did you create *that* amount of semaphores? */ res->name[13] = '\0'; - res->ps = sem_open(res->name, O_CREAT, 0644, 1); + res->ps = sem_open(res->name, O_CREAT, 0644, value); } if ((res->ps == (sem_t *) SEM_FAILED)) THROWF(system_error, errno, "sem_open() failed: %s", strerror(errno)); -- 2.20.1