diff options
| author | Colin Davidson <colrdavidson@gmail.com> | 2025-04-26 18:22:21 -0700 |
|---|---|---|
| committer | Colin Davidson <colrdavidson@gmail.com> | 2025-04-26 18:22:21 -0700 |
| commit | f1fdd1a8b9a53d34b59f8bac86ebba5f35189f28 (patch) | |
| tree | 5d8e0f200c25ae3451f666e7292f9cc9ad3db743 /src/threading.cpp | |
| parent | 78d8ed2d391e8def6b303445c82f7d143897c251 (diff) | |
| parent | 7d4c3d23e6156c1b4be1f91e6d18e51a8e9814f0 (diff) | |
Merge branch 'master' into macharena
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; } |