1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:27:35 +00:00

Kernel: Make block() and yield() automatically call Scheduler::yield().

This exposed some places we were accidentally doing a double yield().
This commit is contained in:
Andreas Kling 2019-03-24 01:52:10 +01:00
parent 5713c3a0cb
commit 239c0bd6a6
6 changed files with 10 additions and 28 deletions

View file

@ -189,8 +189,7 @@ ssize_t IPv4Socket::recvfrom(void* buffer, size_t buffer_length, int flags, sock
current->set_blocked_socket(this);
load_receive_deadline();
block(Thread::BlockedReceive);
Scheduler::yield();
current->block(Thread::BlockedReceive);
LOCKER(lock());
if (!m_can_read) {