aboutsummaryrefslogtreecommitdiff
path: root/src/threading.cpp
diff options
context:
space:
mode:
authorColin Davidson <colrdavidson@gmail.com>2025-04-26 18:22:21 -0700
committerColin Davidson <colrdavidson@gmail.com>2025-04-26 18:22:21 -0700
commitf1fdd1a8b9a53d34b59f8bac86ebba5f35189f28 (patch)
tree5d8e0f200c25ae3451f666e7292f9cc9ad3db743 /src/threading.cpp
parent78d8ed2d391e8def6b303445c82f7d143897c251 (diff)
parent7d4c3d23e6156c1b4be1f91e6d18e51a8e9814f0 (diff)
Merge branch 'master' into macharena
Diffstat (limited to 'src/threading.cpp')
-rw-r--r--src/threading.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/threading.cpp b/src/threading.cpp
index af8fd803c..a0d1c4049 100644
--- a/src/threading.cpp
+++ b/src/threading.cpp
@@ -756,7 +756,7 @@ gb_internal void futex_signal(Futex *f) {
perror("Futex wake");
GB_PANIC("futex wake fail");
- } else if (ret == 1) {
+ } else {
return;
}
}
@@ -773,7 +773,7 @@ gb_internal void futex_broadcast(Futex *f) {
perror("Futex wake");
GB_PANIC("futex wake fail");
- } else if (ret == 1) {
+ } else {
return;
}
}
@@ -783,7 +783,7 @@ gb_internal void futex_wait(Futex *f, Footex val) {
for (;;) {
int ret = futex((volatile uint32_t *)f, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, val, NULL, NULL);
if (ret == -1) {
- if (*f != val) {
+ if (errno == EAGAIN) {
return;
}