提交 3d8d90c5 编写于 作者: R Rich Felker

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.
上级 39f296a9
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册