github.com/afumu/libc@v0.0.6/musl/arch/m68k/pthread_arch.h (about)

     1  static inline struct pthread *__pthread_self()
     2  {
     3  	uintptr_t tp = __syscall(SYS_get_thread_area);
     4  	return (pthread_t)(tp - 0x7000 - sizeof(struct pthread));
     5  }
     6  
     7  #define TLS_ABOVE_TP
     8  #define GAP_ABOVE_TP 0
     9  #define TP_ADJ(p) ((char *)(p) + sizeof(struct pthread) + 0x7000)
    10  
    11  #define DTP_OFFSET 0x8000
    12  
    13  #define MC_PC gregs[R_PC]