summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls
diff options
context:
space:
mode:
authorTimon Kruiper <timonkruiper@gmail.com>2023-02-15 19:49:37 +0100
committerJelle Raaijmakers <jelle@gmta.nl>2023-02-15 22:53:19 +0100
commitcfd73e5d9f71f3bb1882bd999acef4c461b8e18d (patch)
tree894e8ba93fa31d992acf47ec2bc1cd55465d01c0 /Kernel/Syscalls
parent7d0917f50b189db55cbf21641f608be76a6c6abc (diff)
downloadserenity-cfd73e5d9f71f3bb1882bd999acef4c461b8e18d.zip
Kernel/aarch64: Implement Thread Local Storage
This commit adds Processor::set_thread_specific_data, and this function is used to factor out architecture specific implementation of setting the thread specific data. This function is implemented for aarch64 and x86_64, and the callsites are changed to use this function instead.
Diffstat (limited to 'Kernel/Syscalls')
-rw-r--r--Kernel/Syscalls/mmap.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/Kernel/Syscalls/mmap.cpp b/Kernel/Syscalls/mmap.cpp
index 4931624089..af63ab1fe3 100644
--- a/Kernel/Syscalls/mmap.cpp
+++ b/Kernel/Syscalls/mmap.cpp
@@ -566,10 +566,7 @@ ErrorOr<FlatPtr> Process::sys$allocate_tls(Userspace<char const*> initial_data,
TRY(main_thread->make_thread_specific_region({}));
-#if ARCH(X86_64)
- MSR fs_base_msr(MSR_FS_BASE);
- fs_base_msr.set(main_thread->thread_specific_data().get());
-#endif
+ Processor::set_thread_specific_data(main_thread->thread_specific_data());
return m_master_tls_region.unsafe_ptr()->vaddr().get();
});