|
@@ -1543,8 +1543,7 @@ extern "C" void enter_thread_context(Thread* from_thread, Thread* to_thread)
|
|
|
}
|
|
|
|
|
|
auto& processor = Processor::current();
|
|
|
- MSR fs_base_msr(MSR_FS_BASE);
|
|
|
- fs_base_msr.set(to_thread->thread_specific_data().get());
|
|
|
+ Processor::set_thread_specific_data(to_thread->thread_specific_data());
|
|
|
|
|
|
if (from_regs.cr3 != to_regs.cr3)
|
|
|
write_cr3(to_regs.cr3);
|
|
@@ -1887,4 +1886,10 @@ UNMAP_AFTER_INIT void Processor::initialize_context_switching(Thread& initial_th
|
|
|
VERIFY_NOT_REACHED();
|
|
|
}
|
|
|
|
|
|
+void Processor::set_thread_specific_data(VirtualAddress thread_specific_data)
|
|
|
+{
|
|
|
+ MSR fs_base_msr(MSR_FS_BASE);
|
|
|
+ fs_base_msr.set(thread_specific_data.get());
|
|
|
+}
|
|
|
+
|
|
|
}
|