summaryrefslogtreecommitdiff
path: root/arch/m68k/pthread_arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k/pthread_arch.h')
-rw-r--r--arch/m68k/pthread_arch.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/m68k/pthread_arch.h b/arch/m68k/pthread_arch.h
new file mode 100644
index 00000000..02d5b8a0
--- /dev/null
+++ b/arch/m68k/pthread_arch.h
@@ -0,0 +1,13 @@
+static inline struct pthread *__pthread_self()
+{
+ uintptr_t tp = __syscall(SYS_get_thread_area);
+ return (pthread_t)(tp - 0x7000 - sizeof(struct pthread));
+}
+
+#define TLS_ABOVE_TP
+#define GAP_ABOVE_TP 0
+#define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread) + 0x7000)
+
+#define DTP_OFFSET 0x8000
+
+#define MC_PC gregs[R_PC]