diff options
| author | Colin Davidson <colrdavidson@gmail.com> | 2023-01-05 01:27:37 -0800 |
|---|---|---|
| committer | Colin Davidson <colrdavidson@gmail.com> | 2023-01-05 01:27:37 -0800 |
| commit | a58650728e3ee2ee8b9652f1947ee3ee406fc795 (patch) | |
| tree | 780317d4b8c26ac1b4cc55a619477dcc553f1068 | |
| parent | 782f1b4718d32a485c8901e6709e69f10109e950 (diff) | |
fix futex error handling
| -rw-r--r-- | src/threading.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/threading.cpp b/src/threading.cpp index 493e57c91..7a7d1a299 100644 --- a/src/threading.cpp +++ b/src/threading.cpp @@ -562,6 +562,7 @@ gb_internal void tpool_wake_addr(Futex *addr) { if (ret >= 0) { return; } + ret = -ret; if (ret == EINTR || ret == EFAULT) { continue; } @@ -581,6 +582,7 @@ gb_internal void tpool_wait_on_addr(Futex *addr, Footex val) { } continue; } + ret = -ret; if (ret == EINTR || ret == EFAULT) { continue; } |