1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:28:12 +00:00

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.
This commit is contained in:
Tom 2020-08-02 16:59:01 -06:00 committed by Andreas Kling
parent df3c8267d4
commit c813bb7355
7 changed files with 109 additions and 46 deletions

View file

@ -78,7 +78,6 @@ public:
static inline IterationDecision for_each_nonrunnable(Callback);
static void init_thread(Thread& thread);
static void update_state_for_thread(Thread& thread);
};
}