1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 06:47:34 +00:00

Kernel+LibC+Userland: Yet more networking bringup hacking.

All ICMP sockets now receive all ICMP packets. All this buffering is gonna
need some limits and such.
This commit is contained in:
Andreas Kling 2019-03-12 17:27:07 +01:00
parent a017a77442
commit a7d5e9781a
14 changed files with 178 additions and 2 deletions

View file

@ -98,6 +98,16 @@ bool Scheduler::pick_next()
return true;
}
if (process.state() == Process::BlockedReceive) {
ASSERT(process.m_blocked_socket);
// FIXME: Block until the amount of data wanted is available.
if (process.m_blocked_socket->can_read(SocketRole::None)) {
process.unblock();
process.m_blocked_socket = nullptr;
}
return true;
}
if (process.state() == Process::BlockedSelect) {
if (process.m_select_has_timeout) {
auto now_sec = RTC::now();