X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=arch%2Fx86_64%2Fpthread_arch.h;h=c61509cf3e37e4c7f839dfdc53e530311018c0e1;hb=b76d4e06f1686337713a31a9e7274e1321ae41b6;hp=af7ae86e2b72f726b81671f120a3cb3d2591add9;hpb=b470030f839a375e5030ec9d44903ef7581c15a2;p=musl diff --git a/arch/x86_64/pthread_arch.h b/arch/x86_64/pthread_arch.h index af7ae86e..c61509cf 100644 --- a/arch/x86_64/pthread_arch.h +++ b/arch/x86_64/pthread_arch.h @@ -1,9 +1,10 @@ static inline struct pthread *__pthread_self() { struct pthread *self; - __asm__ ("movq %%fs:0,%0" : "=r" (self) ); + __asm__ __volatile__ ("mov %%fs:0,%0" : "=r" (self) ); return self; } -#define PC_AT_SYS(c) \ - (*(uint16_t *)(((ucontext_t *)(c))->uc_mcontext.__gregs[16])==0x050f) +#define TP_ADJ(p) (p) + +#define MC_PC gregs[REG_RIP]