add m68k port
[musl.git] / arch / m68k / pthread_arch.h
blob02d5b8a089f77f61050c5e3291bda3f5f07a6c5d
1 static inline struct pthread *__pthread_self()
3 uintptr_t tp = __syscall(SYS_get_thread_area);
4 return (pthread_t)(tp - 0x7000 - sizeof(struct pthread));
7 #define TLS_ABOVE_TP
8 #define GAP_ABOVE_TP 0
9 #define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread) + 0x7000)
11 #define DTP_OFFSET 0x8000
13 #define MC_PC gregs[R_PC]