mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02:00
Kernel: Move Blocker setup out from constructors into setup_blocker()
Instead of registering with blocker sets and whatnot in the various Blocker subclass constructors, this patch moves such initialization to a separate setup_blocker() virtual. setup_blocker() returns false if there's no need to actually block the thread. This allows us to bail earlier in Thread::block().
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 05:19:48 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/82c3cc46404
@@ -425,6 +425,11 @@ bool Plan9FS::Blocker::unblock(u16 tag)
|
||||
return unblock();
|
||||
}
|
||||
|
||||
bool Plan9FS::Blocker::setup_blocker()
|
||||
{
|
||||
return add_to_blocker_set(m_fs.m_completion_blocker);
|
||||
}
|
||||
|
||||
void Plan9FS::Blocker::will_unblock_immediately_without_blocking(UnblockImmediatelyReason)
|
||||
{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user