aboutsummaryrefslogtreecommitdiff
path: root/src/gb
diff options
context:
space:
mode:
authorYawning Angel <yawning@schwanenlied.me>2021-12-23 02:46:32 +0000
committerYawning Angel <yawning@schwanenlied.me>2021-12-23 02:46:32 +0000
commitdce120258fbca70dfaa9a738bc168463df7a3dda (patch)
tree153f9675c0351376d4e0e9f0ca3f3fd65ef60c2f /src/gb
parent5752a374ab5b072e9d02efe396cc5f92e93e5ebf (diff)
src: Add preliminary support for Linux AArch64
Tested via `tests/core`, on a Raspberry Pi 4 running the latest 64-bit Raspberry Pi OS image (LLVM 11).
Diffstat (limited to 'src/gb')
-rw-r--r--src/gb/gb.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gb/gb.h b/src/gb/gb.h
index f716b0840..d9bf09436 100644
--- a/src/gb/gb.h
+++ b/src/gb/gb.h
@@ -3355,6 +3355,8 @@ gb_inline u32 gb_thread_current_id(void) {
__asm__("mov %%gs:0x08,%0" : "=r"(thread_id));
#elif defined(GB_ARCH_64_BIT) && defined(GB_CPU_X86)
__asm__("mov %%fs:0x10,%0" : "=r"(thread_id));
+#elif defined(GB_SYSTEM_LINUX)
+ thread_id = gettid();
#else
#error Unsupported architecture for gb_thread_current_id()
#endif