if -> while in wait_signal_until_available to check for spurious wake-ups

This commit is contained in:
gingerBill
2024-02-21 12:55:26 +00:00
parent 8472338bfa
commit d7b7804215

View File

@@ -112,7 +112,7 @@ struct Wait_Signal {
};
gb_internal void wait_signal_until_available(Wait_Signal *ws) {
if (ws->futex.load() == 0) {
while (ws->futex.load() == 0) {
futex_wait(&ws->futex, 1);
}
}