mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Return value of _umtx_op on FreeBSD wasn't checked correctly
This commit is contained in:
+1
-1
@@ -660,7 +660,7 @@ gb_internal void futex_broadcast(Futex *addr) {
|
|||||||
gb_internal void futex_wait(Futex *addr, Footex val) {
|
gb_internal void futex_wait(Futex *addr, Footex val) {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
int ret = _umtx_op(addr, UMTX_OP_WAIT_UINT, val, 0, NULL);
|
int ret = _umtx_op(addr, UMTX_OP_WAIT_UINT, val, 0, NULL);
|
||||||
if (ret == 0) {
|
if (ret == -1) {
|
||||||
if (errno == ETIMEDOUT || errno == EINTR) {
|
if (errno == ETIMEDOUT || errno == EINTR) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user