about summary refs log tree commit diff
path: root/src/thread/__wait.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread/__wait.c')
-rw-r--r--src/thread/__wait.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread/__wait.c b/src/thread/__wait.c
index c1d6b61c..01ee5982 100644
--- a/src/thread/__wait.c
+++ b/src/thread/__wait.c
@@ -4,7 +4,7 @@ void __wait(volatile int *addr, volatile int *waiters, int val, int priv)
 {
 	int spins=100;
 	if (priv) priv = 128;
-	while (spins--) {
+	while (spins-- && (!waiters || !*waiters)) {
 		if (*addr==val) a_spin();
 		else return;
 	}