From 17210a39e4c5dc55640b2a2c4376cc8c458c5fea Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 27 Jan 2020 13:10:24 +0100 Subject: [PATCH] Kernel: Remove ancient hack that put the current PID in TSS.SS2 While I was bringing up multitasking, I put the current PID in the SS2 (ring 2 stack segment) slot of the TSS. This was so I could see which PID was currently running when just inspecting the CPU state. --- Kernel/Thread.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Kernel/Thread.cpp b/Kernel/Thread.cpp index 11c8a94d26..7bba273378 100644 --- a/Kernel/Thread.cpp +++ b/Kernel/Thread.cpp @@ -128,10 +128,6 @@ Thread::Thread(Process& process) m_tss.esp0 = m_kernel_stack_top; } - // HACK: Ring2 SS in the TSS is the current PID. - m_tss.ss2 = m_process.pid(); - m_far_ptr.offset = 0x98765432; - if (m_process.pid() != 0) { InterruptDisabler disabler; thread_table().set(this);