Change futex_wait_with_timeout to return a boolean rather than an enum

This commit is contained in:
gingerBill
2021-10-11 13:23:11 +01:00
parent a1e8769cff
commit 240b6aab13
5 changed files with 22 additions and 26 deletions
+1 -1
View File
@@ -307,7 +307,7 @@ queue_item_wait_with_timeout :: proc(item: ^Queue_Item, duration: time.Duration)
if remaining < 0 {
return false
}
if futex_wait_with_timeout(&item.futex, 0, remaining) == .Timed_Out {
if !futex_wait_with_timeout(&item.futex, 0, remaining) {
return false
}
cpu_relax()