Skip to content

Commit

Permalink
Update "sys_thread_set_tsd_base" to use "__darling_thread_set_tsd"
Browse files Browse the repository at this point in the history
Forgot to fix this code as well when fixing the TPIDR_EL0 issue
  • Loading branch information
CuriousTommy committed Jun 9, 2024
1 parent dc5db75 commit 0ff8532
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion darling/src/libsystem_kernel/emulation/linux/machdep/tls.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <emulation/linux/elfcalls_wrapper.h>
#include <linux-syscalls/linux.h>
#include "tls.h"

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0ff8532

Please sign in to comment.