X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/58a279d8ca32bc6c9ff69d16d7e2ac815f80db2c..d3f512f7aa1edd465ed2a1e8c986f679eebc5e14:/src/xbt/xbt_os_thread.c 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));