about summary refs log tree commit diff
path: root/src/thread
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-09-29 16:49:32 -0400
committerRich Felker <dalias@aerifal.cx>2012-09-29 16:49:32 -0400
commit3d8d90c5ccf66f1d243cb1b248b047295c197b5c (patch)
treec9bf63171411b24d2e60fa99572ac0db5360ea38 /src/thread
parent39f296a95b02925b8c3439e140a5668e36055d9b (diff)
downloadmusl-3d8d90c5ccf66f1d243cb1b248b047295c197b5c.tar.gz
musl-3d8d90c5ccf66f1d243cb1b248b047295c197b5c.tar.xz
musl-3d8d90c5ccf66f1d243cb1b248b047295c197b5c.zip
sem_open should make process-shared semaphores
this did not matter because we don't yet treat process-shared special.
when private futex support is added, however, it will matter.
Diffstat (limited to 'src/thread')
-rw-r--r--src/thread/sem_open.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread/sem_open.c b/src/thread/sem_open.c
index 0361a769..2e900eb3 100644
--- a/src/thread/sem_open.c
+++ b/src/thread/sem_open.c
@@ -71,7 +71,7 @@ sem_t *sem_open(const char *name, int flags, ...)
 			errno = EINVAL;
 			return SEM_FAILED;
 		}
-		sem_init(&newsem, 0, value);
+		sem_init(&newsem, 1, value);
 		clock_gettime(CLOCK_REALTIME, &ts);
 		snprintf(tmp, sizeof(tmp), "/dev/shm/%p-%p-%d-%d",
 			&name, name, (int)getpid(), (int)ts.tv_nsec);