mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 19:19:30 +00:00
Kernel: Prevent recursive calls into the scheduler
Upon leaving a critical section (such as a SpinLock) we need to check if we're already asynchronously invoking the Scheduler. Otherwise we might end up triggering another context switch as soon as leaving the scheduler lock. Fixes #2883
This commit is contained in:
parent
a19304c9d6
commit
728de56481
Notes:
sideshowbarker
2024-07-19 04:23:42 +09:00
Author: https://github.com/tomuta
Commit: 728de56481
Pull-request: https://github.com/SerenityOS/serenity/pull/2943
Reviewed-by: https://github.com/awesomekling
5 changed files with 136 additions and 21 deletions
|
@ -62,6 +62,9 @@ public:
|
|||
static bool donate_to(Thread*, const char* reason);
|
||||
static bool context_switch(Thread*);
|
||||
static void enter_current(Thread& prev_thread);
|
||||
static void leave_on_first_switch(u32 flags);
|
||||
static void prepare_after_exec();
|
||||
static void prepare_for_idle_loop();
|
||||
static Process* colonel();
|
||||
static void beep();
|
||||
static void idle_loop();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue