From 0ff853232c6ca96ad8600bda28bb636ec31b932f Mon Sep 17 00:00:00 2001 From: "Thomas A." Date: Sat, 8 Jun 2024 23:34:52 -0700 Subject: [PATCH] Update "sys_thread_set_tsd_base" to use "__darling_thread_set_tsd" Forgot to fix this code as well when fixing the TPIDR_EL0 issue --- darling/src/libsystem_kernel/emulation/linux/machdep/tls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/darling/src/libsystem_kernel/emulation/linux/machdep/tls.c b/darling/src/libsystem_kernel/emulation/linux/machdep/tls.c index 37bf0bc..d5d51cb 100644 --- a/darling/src/libsystem_kernel/emulation/linux/machdep/tls.c +++ b/darling/src/libsystem_kernel/emulation/linux/machdep/tls.c @@ -1,3 +1,4 @@ +#include #include #include "tls.h" @@ -39,7 +40,7 @@ void sys_thread_set_tsd_base(void* ptr, int unk) entry_number = desc.entry_number; __asm__ ("movl %0, %%fs" :: "r" (desc.entry_number*8 + 3)); #elif defined(__arm64__) - __asm__ ("msr TPIDR_EL0, %0" :: "r" (ptr)); + __darling_thread_set_tsd(ptr); #else #error "Missing sys_thread_set_tsd_base implementation for arch" #endif