diff options
| author | Paco Pascal <me@pacopascal.com> | 2023-11-18 20:56:22 -0500 |
|---|---|---|
| committer | Paco Pascal <me@pacopascal.com> | 2023-11-18 20:56:22 -0500 |
| commit | d9fab5e824b5caee48ed96cf76e0011f0cdf6742 (patch) | |
| tree | 8d20e20e92e88c61faf7affdd3f3a2d27e33848f /src/threading.cpp | |
| parent | 0424404140f628e6fec74343d3fd75092a1ef1a4 (diff) | |
Return value of _umtx_op on FreeBSD wasn't checked correctly
Diffstat (limited to 'src/threading.cpp')
| -rw-r--r-- | src/threading.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/threading.cpp b/src/threading.cpp index 3ddc05b0a..74aa3eb7e 100644 --- a/src/threading.cpp +++ b/src/threading.cpp @@ -660,7 +660,7 @@ gb_internal void futex_broadcast(Futex *addr) { gb_internal void futex_wait(Futex *addr, Footex val) { for (;;) { int ret = _umtx_op(addr, UMTX_OP_WAIT_UINT, val, 0, NULL); - if (ret == 0) { + if (ret == -1) { if (errno == ETIMEDOUT || errno == EINTR) { continue; } |