musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src
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
parent39f296a95b02925b8c3439e140a5668e36055d9b (diff)
downloadmusl-3d8d90c5ccf66f1d243cb1b248b047295c197b5c.tar.gz
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')
-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);
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月30日 08:01:36 +0000

AltStyle によって変換されたページ (->オリジナル) /