summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-03-27 14:30:13 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-03-27 14:30:13 +0100
commit1592612a60e0c7b9e322cb2195a8458664ece7f4 (patch)
tree7ab908cdf9781b4b3c070e2899ec5500ac2d9c38
parentd5508e5116539c35ba6f709ca9bfb3f26835aed4 (diff)
downloadserenity-1592612a60e0c7b9e322cb2195a8458664ece7f4.zip
Kernel: Don't disable interrupts during Thread destruction.
-rw-r--r--Kernel/Process.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index 493cc74db1..5c1bd570a1 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -612,8 +612,10 @@ Process::Process(String&& name, uid_t uid, gid_t gid, pid_t ppid, RingLevel ring
Process::~Process()
{
dbgprintf("~Process{%p} name=%s pid=%d, m_fds=%d\n", this, m_name.characters(), pid(), m_fds.size());
- InterruptDisabler disabler;
- system.nprocess--;
+ {
+ InterruptDisabler disabler;
+ system.nprocess--;
+ }
delete m_main_thread;
m_main_thread = nullptr;