lang-bootstrap/05/musl-0.6.0/arch/x86_64/pthread_arch.h
2022-02-20 13:18:21 -08:00

6 lines
132 B
C

static inline struct pthread *__pthread_self()
{
struct pthread *self;
__asm__ ("movq %%fs:0,%0" : "=r" (self) );
return self;
}