musl/arch/x86_64/pthread_arch.h

9 lines
137 B
C
Raw Normal View History

static inline uintptr_t __get_tp()
2011-02-15 12:32:09 +00:00
{
uintptr_t tp;
__asm__ ("mov %%fs:0,%0" : "=r" (tp) );
return tp;
2011-02-15 12:32:09 +00:00
}
#define MC_PC gregs[REG_RIP]