mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
Thread: Return a result from block() indicating why the block terminated
And use this to return EINTR in various places; some of which we were not handling properly before. This might expose a few bugs in userspace, but should be more compatible with other POSIX systems, and is certainly a little cleaner.
This commit is contained in:
parent
56217c7432
commit
833d444cd8
Notes:
sideshowbarker
2024-07-19 13:07:50 +09:00
Author: https://github.com/rburchell
Commit: 833d444cd8
Pull-request: https://github.com/SerenityOS/serenity/pull/351
9 changed files with 73 additions and 38 deletions
|
@ -242,7 +242,7 @@ extern "C" [[noreturn]] void init()
|
|||
current->process().set_priority(Process::LowPriority);
|
||||
for (;;) {
|
||||
Thread::finalize_dying_threads();
|
||||
current->block<Thread::SemiPermanentBlocker>(Thread::SemiPermanentBlocker::Reason::Lurking);
|
||||
(void)current->block<Thread::SemiPermanentBlocker>(Thread::SemiPermanentBlocker::Reason::Lurking);
|
||||
Scheduler::yield();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue