diff options
author | Tom <tomut@yahoo.com> | 2020-08-02 16:59:01 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-03 15:59:11 +0200 |
commit | c813bb7355d7635e5397edee10e12fd400d9d966 (patch) | |
tree | 6211adfe12d39f9b9657848a63e2ad72b83f79a1 /Kernel/FileSystem/Plan9FileSystem.cpp | |
parent | df3c8267d41d5caebd769d246ef70c85a16029e7 (diff) | |
download | serenity-c813bb7355d7635e5397edee10e12fd400d9d966.zip |
Kernel: Fix a few Thread::block related races
We need to have a Thread lock to protect threading related
operations, such as Thread::m_blocker which is used in
Thread::block.
Also, if a Thread::Blocker indicates that it should be
unblocking immediately, don't actually block the Thread
and instead return immediately in Thread::block.
Diffstat (limited to 'Kernel/FileSystem/Plan9FileSystem.cpp')
-rw-r--r-- | Kernel/FileSystem/Plan9FileSystem.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/FileSystem/Plan9FileSystem.cpp b/Kernel/FileSystem/Plan9FileSystem.cpp index aa5bc2c4ba..0cad8056b7 100644 --- a/Kernel/FileSystem/Plan9FileSystem.cpp +++ b/Kernel/FileSystem/Plan9FileSystem.cpp @@ -498,7 +498,7 @@ KResult Plan9FS::read_and_dispatch_one_message() return KSuccess; } -bool Plan9FS::Blocker::should_unblock(Thread&, time_t, long) +bool Plan9FS::Blocker::should_unblock(Thread&) { if (m_completion.completed) return true; |