diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-10-25 13:07:59 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-10-25 13:09:56 +0200 |
commit | c6f2890d8e4620e85d6320a9ed121b640dded80e (patch) | |
tree | d6d380e877934a9d5c52b5e40d313f3fb7aba683 /Kernel/init.cpp | |
parent | ba56f4afde609e74aa8398653b399725f88c8448 (diff) | |
download | serenity-c6f2890d8e4620e85d6320a9ed121b640dded80e.zip |
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.
Diffstat (limited to 'Kernel/init.cpp')
-rw-r--r-- | Kernel/init.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/init.cpp b/Kernel/init.cpp index 66109f8475..92026a036c 100644 --- a/Kernel/init.cpp +++ b/Kernel/init.cpp @@ -165,7 +165,7 @@ static void init_stage2() #endif for (;;) { - sleep(3600 * TICKS_PER_SECOND); + //sleep(3600 * TICKS_PER_SECOND); asm("hlt"); } } |