mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-30 09:54:45 +00:00
Return value of _umtx_op on FreeBSD wasn't checked correctly
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user