aboutsummaryrefslogtreecommitdiff
path: root/src/threading.cpp
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2025-06-27 01:20:37 +0200
committerGitHub <noreply@github.com>2025-06-27 01:20:37 +0200
commit2e83e221419b480160dbf11dd09edf8b5fa97f32 (patch)
treebc5e666006bf43931bc793ac921061b5630db4d4 /src/threading.cpp
parentc51df72f1a8a21dd0064086dfc1186a3dd79e2ef (diff)
parentf72b2b153057e1d629c85af2ea7c54f7928198d5 (diff)
Merge branch 'master' into args-leak
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;
}