mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
Kernel: Try to dispatch pending signals on context switch
This ensures that processes that don't perform any syscalls will also eventually receive signals.
This commit is contained in:
parent
0911112286
commit
5fa75dbcda
Notes:
sideshowbarker
2024-07-17 18:25:19 +09:00
Author: https://github.com/IdanHo
Commit: 5fa75dbcda
Pull-request: https://github.com/SerenityOS/serenity/pull/12704
Issue: https://github.com/SerenityOS/serenity/issues/9837
2 changed files with 11 additions and 4 deletions
|
@ -304,6 +304,11 @@ void Scheduler::context_switch(Thread* thread)
|
|||
// switched from, and thread reflects Thread::current()
|
||||
enter_current(*from_thread);
|
||||
VERIFY(thread == Thread::current());
|
||||
|
||||
{
|
||||
SpinlockLocker lock(thread->get_lock());
|
||||
thread->dispatch_one_pending_signal();
|
||||
}
|
||||
}
|
||||
|
||||
void Scheduler::enter_current(Thread& prev_thread)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue