Kernel: Reorder FUTEX_WAIT value and timeout check
Return EAGAIN rather than ETIMEDOUT if value does not match at futex entry
This commit is contained in:
@@ -3215,6 +3215,9 @@ namespace Kernel
|
|||||||
return BAN::Error::from_errno(ENOSYS);
|
return BAN::Error::from_errno(ENOSYS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (op == FUTEX_WAIT && BAN::atomic_load(*addr) != val)
|
||||||
|
return BAN::Error::from_errno(EAGAIN);
|
||||||
|
|
||||||
uint64_t wake_time_ns = BAN::numeric_limits<uint64_t>::max();
|
uint64_t wake_time_ns = BAN::numeric_limits<uint64_t>::max();
|
||||||
|
|
||||||
if (user_abstime != nullptr)
|
if (user_abstime != nullptr)
|
||||||
@@ -3236,9 +3239,6 @@ namespace Kernel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (op == FUTEX_WAIT && BAN::atomic_load(*addr) != val)
|
|
||||||
return BAN::Error::from_errno(EAGAIN);
|
|
||||||
|
|
||||||
futex_t* futex;
|
futex_t* futex;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user