diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-06-27 01:20:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-27 01:20:37 +0200 |
| commit | 2e83e221419b480160dbf11dd09edf8b5fa97f32 (patch) | |
| tree | bc5e666006bf43931bc793ac921061b5630db4d4 /src/threading.cpp | |
| parent | c51df72f1a8a21dd0064086dfc1186a3dd79e2ef (diff) | |
| parent | f72b2b153057e1d629c85af2ea7c54f7928198d5 (diff) | |
Merge branch 'master' into args-leak
Diffstat (limited to 'src/threading.cpp')
| -rw-r--r-- | src/threading.cpp | 6 |
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; } |