aboutsummaryrefslogtreecommitdiff
path: root/src/threading.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-02-21 12:55:26 +0000
committergingerBill <bill@gingerbill.org>2024-02-21 12:55:26 +0000
commitd7b7804215e451d620894affedc57a42b5105f6b (patch)
tree505959a932ad1d0e55011d4efe1d8091f015e91b /src/threading.cpp
parent8472338bfaac80644b1540618aa1ecbf1bc14841 (diff)
`if` -> `while` in `wait_signal_until_available` to check for spurious wake-ups
Diffstat (limited to 'src/threading.cpp')
-rw-r--r--src/threading.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/threading.cpp b/src/threading.cpp
index 725b58c89..4f7f5b12b 100644
--- a/src/threading.cpp
+++ b/src/threading.cpp
@@ -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);
}
}