mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 10:12:25 -05:00
Kernel: Unblock threads only on unmasked signals
Signals that were explicitly masked should not unblock threads.
This commit is contained in:
parent
81a76a30a1
commit
1397a5ab02
Notes:
sideshowbarker
2024-07-17 22:54:58 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/1397a5ab02a Pull-request: https://github.com/SerenityOS/serenity/pull/11216 Reviewed-by: https://github.com/bgianfo ✅
1 changed files with 3 additions and 0 deletions
|
@ -638,6 +638,9 @@ void Thread::send_signal(u8 signal, [[maybe_unused]] Process* sender)
|
|||
m_pending_signals |= 1 << (signal - 1);
|
||||
m_have_any_unmasked_pending_signals.store((pending_signals_for_state() & ~m_signal_mask) != 0, AK::memory_order_release);
|
||||
|
||||
if (!has_unmasked_pending_signals())
|
||||
return;
|
||||
|
||||
if (m_state == Stopped) {
|
||||
SpinlockLocker lock(m_lock);
|
||||
if (pending_signals_for_state() != 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue