diff options
Diffstat (limited to '05/musl-0.6.0/arch/x86_64/pthread_arch.h')
-rw-r--r-- | 05/musl-0.6.0/arch/x86_64/pthread_arch.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/05/musl-0.6.0/arch/x86_64/pthread_arch.h b/05/musl-0.6.0/arch/x86_64/pthread_arch.h new file mode 100644 index 0000000..40d2679 --- /dev/null +++ b/05/musl-0.6.0/arch/x86_64/pthread_arch.h @@ -0,0 +1,6 @@ +static inline struct pthread *__pthread_self() +{ + struct pthread *self; + __asm__ ("movq %%fs:0,%0" : "=r" (self) ); + return self; +} |