mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:28:11 +00:00
Kernel: Fix checking BlockResult
We now have BlockResult::WokeNormally and BlockResult::NotBlocked, both of which indicate no error. We can no longer just check for BlockResult::WokeNormally and assume anything else must be an interruption.
This commit is contained in:
parent
1493dd9dc6
commit
419703a1f2
7 changed files with 56 additions and 27 deletions
|
@ -250,7 +250,7 @@ ssize_t IPv4Socket::receive_byte_buffered(FileDescription& description, void* bu
|
|||
locker.lock();
|
||||
|
||||
if (!m_can_read) {
|
||||
if (res != Thread::BlockResult::WokeNormally)
|
||||
if (res.was_interrupted())
|
||||
return -EINTR;
|
||||
|
||||
// Unblocked due to timeout.
|
||||
|
@ -300,7 +300,7 @@ ssize_t IPv4Socket::receive_packet_buffered(FileDescription& description, void*
|
|||
locker.lock();
|
||||
|
||||
if (!m_can_read) {
|
||||
if (res != Thread::BlockResult::WokeNormally)
|
||||
if (res.was_interrupted())
|
||||
return -EINTR;
|
||||
|
||||
// Unblocked due to timeout.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue