diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-09-29 16:49:32 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-09-29 16:49:32 -0400 |
commit | 3d8d90c5ccf66f1d243cb1b248b047295c197b5c (patch) | |
tree | c9bf63171411b24d2e60fa99572ac0db5360ea38 /src/thread | |
parent | 39f296a95b02925b8c3439e140a5668e36055d9b (diff) | |
download | musl-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.c | 2 |
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); |