Skip to content

Commit c4dfaf3

Browse files
committed
Reverse condition
1 parent 54f145c commit c4dfaf3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/lib/libc/musl/src/thread/__timedwait.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ int __timedwait_cp(volatile int *addr, int val,
7878
// cancel execution.
7979
return ECANCELED;
8080
}
81-
if (msecsToSleep <= 0)
81+
if (msecsToSleep > 0)
8282
// Must wait in slices in case this thread is cancelled in between.
8383
r = -emscripten_futex_wait((void*)addr, val,
8484
msecsToSleep > max_ms_slice_to_sleep ? max_ms_slice_to_sleep : msecsToSleep);

0 commit comments

Comments
 (0)