mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 01:51:03 +09:00
Implement a basic way for read() to block.
FileHandle gets a hasDataAvailableForRead() getter. If this returns true in sys$read(), the task will block(BlockedRead) + yield. The fd blocked on is stored in Task::m_fdBlockedOnRead. The scheduler then looks at the state of that fd during the unblock phase. This makes "sh" restful. :^) There's still some problem with the kernel not surviving the colonel task getting scheduled. I need to figure that out and fix it.
This commit is contained in:
parent
ba56f4afde
commit
c6f2890d8e
Notes:
sideshowbarker
2024-07-19 18:38:47 +09:00
Author: https://github.com/awesomekling
Commit: c6f2890d8e
18 changed files with 86 additions and 17 deletions
|
@ -21,6 +21,11 @@ Console::~Console()
|
|||
{
|
||||
}
|
||||
|
||||
bool Console::hasDataAvailableForRead() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
ssize_t Console::read(byte* buffer, size_t bufferSize)
|
||||
{
|
||||
// FIXME: Implement reading from the console.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue