Skip to content

Commit f687048

Browse files
authored
__wait.c: fix a timeout (#361)
Note: The typical symptom of this bug is a busy waiting on a lock. Note: 0 means immediate timeout. a negative value means no timeout.
1 parent defd631 commit f687048

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libc-top-half/musl/src/thread/__wait.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void __wait(volatile int *addr, volatile int *waiters, int val, int priv)
4848
__syscall(SYS_futex, addr, FUTEX_WAIT|priv, val, 0) != -ENOSYS
4949
|| __syscall(SYS_futex, addr, FUTEX_WAIT, val, 0);
5050
#else
51-
__wasilibc_futex_wait(addr, FUTEX_WAIT, val, 0);
51+
__wasilibc_futex_wait(addr, FUTEX_WAIT, val, -1);
5252
#endif
5353
}
5454
if (waiters) a_dec(waiters);

0 commit comments

Comments
 (0)