serenity/Kernel/Tasks
Sönke Holz 243d7003a2 Kernel+LibC+LibELF: Move TLS handling to userspace
This removes the allocate_tls syscall and adds an archctl option to set
the fs_base for the current thread on x86-64, since you can't set that
register from userspace. enter_thread_context loads the fs_base for the
next thread on each context switch.
This also moves tpidr_el0 (the thread pointer register on AArch64) to
the register state, so it gets properly saved/restored on context
switches.

The userspace TLS allocation code is kept pretty similar to the original
kernel TLS code, aside from a couple of style changes.

We also have to add a new argument "tls_pointer" to
SC_create_thread_params, as we otherwise can't prevent race conditions
between setting the thread pointer register and signal handling code
that might be triggered before the thread pointer was set, which could
use TLS.
2024-04-19 16:46:47 -06:00
..
AtomicEdgeAction.h Kernel: Move all tasks-related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
Coredump.cpp Everywhere: Replace ElfW(type) macro usage with Elf_type 2023-12-01 10:02:39 +02:00
Coredump.h Kernel: Move task-crash related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
CrashHandler.cpp Kernel: Make CrashHandler more useful before init_stage2 2023-12-09 22:36:28 +01:00
FinalizerTask.cpp Kernel: Don't allocate memory for names of processes and threads 2023-08-09 21:06:54 -06:00
FinalizerTask.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
FutexQueue.cpp Kernel: Move all tasks-related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
FutexQueue.h Kernel: Move all tasks-related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
PerformanceEventBuffer.cpp Kernel+ProfileViewer: Display additional filesystem events 2023-09-09 11:26:51 -06:00
PerformanceEventBuffer.h Kernel+ProfileViewer: Display additional filesystem events 2023-09-09 11:26:51 -06:00
PerformanceManager.h Kernel+ProfileViewer: Display additional filesystem events 2023-09-09 11:26:51 -06:00
PowerStateSwitchTask.cpp Kernel: Move TTY-related code to a new subdirectory under Devices 2023-09-09 12:08:59 -06:00
PowerStateSwitchTask.h Kernel: Merge PowerStateSwitchTask reboot and shutdown procedures 2023-08-20 13:04:42 -06:00
Process.cpp Kernel: Track KCOVInstance via Process instead of HashMap 2024-04-15 21:16:22 -06:00
Process.h Kernel+LibC+LibELF: Move TLS handling to userspace 2024-04-19 16:46:47 -06:00
ProcessGroup.cpp Kernel: Move all tasks-related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
ProcessGroup.h Kernel: Move all tasks-related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
ProcessList.cpp Kernel: Move all tasks-related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
Scheduler.cpp Kernel: Deduplicate backtrace printing 2024-04-15 21:16:22 -06:00
Scheduler.h Kernel: Move all tasks-related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
SyncTask.cpp Kernel: Don't allocate memory for names of processes and threads 2023-08-09 21:06:54 -06:00
SyncTask.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Thread.cpp Kernel+LibC+LibELF: Move TLS handling to userspace 2024-04-19 16:46:47 -06:00
Thread.h Kernel+LibC+LibELF: Move TLS handling to userspace 2024-04-19 16:46:47 -06:00
ThreadBlockers.cpp Kernel: Move all tasks-related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
ThreadTracer.cpp Kernel: Move all tasks-related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
ThreadTracer.h Everywhere: Remove exceptions for using #include <LibC/...> 2023-06-27 12:40:38 +02:00
WaitQueue.cpp Kernel: Move all tasks-related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
WaitQueue.h Kernel: Move all tasks-related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00
WorkQueue.cpp Kernel: Don't allocate memory for names of processes and threads 2023-08-09 21:06:54 -06:00
WorkQueue.h Kernel: Move all tasks-related code to the Tasks subdirectory 2023-06-04 21:32:34 +02:00