projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39f296a
)
sem_open should make process-shared semaphores
author
Rich Felker
<dalias@aerifal.cx>
Sat, 29 Sep 2012 20:49:32 +0000
(16:49 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Sat, 29 Sep 2012 20:49:32 +0000
(16:49 -0400)
this did not matter because we don't yet treat process-shared special.
when private futex support is added, however, it will matter.
src/thread/sem_open.c
patch
|
blob
|
history
diff --git
a/src/thread/sem_open.c
b/src/thread/sem_open.c
index 0361a7695e387ce56e0e33fc3527878cb6a86b61..2e900eb3a2dc0e393d9c712c6ac460d323a29609 100644
(file)
--- 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);