mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 01:06:01 +03: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 ✅
@ -638,6 +638,9 @@ void Thread::send_signal(u8 signal, [[maybe_unused]] Process* sender)
|
|||||||
m_pending_signals |= 1 << (signal - 1);
|
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);
|
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) {
|
if (m_state == Stopped) {
|
||||||
SpinlockLocker lock(m_lock);
|
SpinlockLocker lock(m_lock);
|
||||||
if (pending_signals_for_state() != 0) {
|
if (pending_signals_for_state() != 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user