Kernel: Don't call Thread::set_should_die() twice on every thread

This stops the "should already die" debug spam we've been seeing.
This commit is contained in:
Andreas Kling 2021-02-11 23:32:36 +01:00
parent 3c7782fdbe
commit 8c694ed6eb

View file

@ -246,7 +246,6 @@ void Thread::die_if_needed()
[[maybe_unused]] auto rc = unlock_process_if_locked(unlock_count);
ScopedCritical critical;
set_should_die();
// Flag a context switch. Because we're in a critical section,
// Scheduler::yield will actually only mark a pending scontext switch