about summary refs log tree commit diff
path: root/src/thread/sem_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread/sem_init.c')
-rw-r--r--src/thread/sem_init.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/thread/sem_init.c b/src/thread/sem_init.c
index e8e419cf..55092434 100644
--- a/src/thread/sem_init.c
+++ b/src/thread/sem_init.c
@@ -10,5 +10,6 @@ int sem_init(sem_t *sem, int pshared, unsigned value)
 	}
 	sem->__val[0] = value;
 	sem->__val[1] = 0;
+	sem->__val[2] = pshared ? 0 : 128;
 	return 0;
 }