diff options
Diffstat (limited to 'nptl/sysdeps/x86_64/tls.h')
-rw-r--r-- | nptl/sysdeps/x86_64/tls.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h index e7fab7a1b2..f382db2861 100644 --- a/nptl/sysdeps/x86_64/tls.h +++ b/nptl/sysdeps/x86_64/tls.h @@ -253,6 +253,18 @@ typedef struct }}) +#define CALL_THREAD_FCT(descr) \ + ({ void *__res; \ + asm volatile ("movq %%fs:%P2, %%rdi\n\t" \ + "callq *%%fs:%P1" \ + : "=a" (__res) \ + : "i" (offsetof (struct pthread, start_routine)), \ + "i" (offsetof (struct pthread, arg)) \ + : "di", "si", "cx", "dx", "r8", "r9", "r10", "r11", \ + "memory", "cc"); \ + __res; }) + + #endif /* __ASSEMBLER__ */ #endif /* tls.h */ |