mirror of
git://git.musl-libc.org/musl
synced 2024-12-21 22:30:09 +00:00
1f53e7d00c
x32 has another gratuitous difference to all other archs: it passes an array of 64bit values to __tls_get_addr(). usually it is an array of size_t.
15 lines
263 B
C
15 lines
263 B
C
static inline struct pthread *__pthread_self()
|
|
{
|
|
struct pthread *self;
|
|
__asm__ __volatile__ ("mov %%fs:0,%0" : "=r" (self) );
|
|
return self;
|
|
}
|
|
|
|
#define TP_ADJ(p) (p)
|
|
|
|
#define MC_PC gregs[REG_RIP]
|
|
|
|
#define CANARY canary2
|
|
|
|
#define tls_mod_off_t unsigned long long
|