diff options
Diffstat (limited to 'arch/i386/pthread_arch.h')
-rw-r--r-- | arch/i386/pthread_arch.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/i386/pthread_arch.h b/arch/i386/pthread_arch.h new file mode 100644 index 00000000..155b4847 --- /dev/null +++ b/arch/i386/pthread_arch.h @@ -0,0 +1,6 @@ +static inline struct pthread *__pthread_self() +{ + struct pthread *self; + __asm__ ("movl %%gs:0,%0" : "=r" (self) ); + return self; +} |