about summary refs log tree commit diff
path: root/src/thread/pthread_once.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread/pthread_once.c')
-rw-r--r--src/thread/pthread_once.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/thread/pthread_once.c b/src/thread/pthread_once.c
index e01f6d48..2eb0f932 100644
--- a/src/thread/pthread_once.c
+++ b/src/thread/pthread_once.c
@@ -3,7 +3,7 @@
 static void undo(void *control)
 {
 	a_store(control, 0);
-	__wake(control, 1, 0);
+	__wake(control, 1, 1);
 }
 
 int pthread_once(pthread_once_t *control, void (*init)(void))
@@ -25,10 +25,10 @@ int pthread_once(pthread_once_t *control, void (*init)(void))
 		pthread_cleanup_pop(0);
 
 		a_store(control, 2);
-		if (waiters) __wake(control, -1, 0);
+		if (waiters) __wake(control, -1, 1);
 		return 0;
 	case 1:
-		__wait(control, &waiters, 1, 0);
+		__wait(control, &waiters, 1, 1);
 		continue;
 	case 2:
 		return 0;