1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:48:12 +00:00

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.
This commit is contained in:
Andreas Kling 2020-01-27 13:10:24 +01:00
parent ae0f92a0a1
commit 17210a39e4

View file

@ -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);