mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:08:13 +00:00
Kernel: Don't dispatch signals in Processor::enter_current()
Signal dispatch is already taken care of elsewhere, so there appears to be no need for the hack in enter_current(). This also allows us to remove the Thread::m_in_block flag, simplifying thread blocking logic somewhat. Verified with the original repro for #4336 which this was meant to fix.
This commit is contained in:
parent
3845c90e08
commit
677da0288c
5 changed files with 5 additions and 23 deletions
|
@ -158,8 +158,6 @@ Thread::BlockResult Thread::block_impl(BlockTimeout const& timeout, Blocker& blo
|
|||
SpinlockLocker block_lock(m_block_lock);
|
||||
// We need to hold m_block_lock so that nobody can unblock a blocker as soon
|
||||
// as it is constructed and registered elsewhere
|
||||
VERIFY(!m_in_block);
|
||||
TemporaryChange in_block_change(m_in_block, true);
|
||||
|
||||
ScopeGuard finalize_guard([&] {
|
||||
blocker.finalize();
|
||||
|
@ -264,8 +262,7 @@ Thread::BlockResult Thread::block_impl(BlockTimeout const& timeout, Blocker& blo
|
|||
TimerQueue::the().cancel_timer(*m_block_timer);
|
||||
}
|
||||
if (previous_locked != LockMode::Unlocked) {
|
||||
// NOTE: this may trigger another call to Thread::block(), so
|
||||
// we need to do this after we're all done and restored m_in_block!
|
||||
// NOTE: This may trigger another call to Thread::block().
|
||||
relock_process(previous_locked, lock_count_to_restore);
|
||||
}
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue