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

Kernel: Implement TLS support for x86_64

This commit is contained in:
Gunnar Beutner 2021-07-03 00:25:44 +02:00 committed by Andreas Kling
parent 04a912f68f
commit c51b49a8cb
2 changed files with 6 additions and 1 deletions

View file

@ -1214,6 +1214,9 @@ extern "C" void enter_thread_context(Thread* from_thread, Thread* to_thread)
auto& tls_descriptor = processor.get_gdt_entry(GDT_SELECTOR_TLS);
tls_descriptor.set_base(to_thread->thread_specific_data());
tls_descriptor.set_limit(to_thread->thread_specific_region_size());
#else
MSR fs_base_msr(MSR_FS_BASE);
fs_base_msr.set(to_thread->thread_specific_data().get());
#endif
if (from_regs.cr3 != to_regs.cr3)