mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-13 04:30:07 +00:00
13 lines
349 B
Plaintext
13 lines
349 B
Plaintext
|
#include <sysdep.h>
|
||
|
#include <tls.h>
|
||
|
|
||
|
--
|
||
|
|
||
|
-- Abuse tls.h macros to derive offsets relative to the thread register.
|
||
|
# define __builtin_thread_pointer() ((void *) 0)
|
||
|
# define thread_offsetof(mem) ((void *) &THREAD_SELF->mem - (void *) 0)
|
||
|
|
||
|
#if TLS_MULTIPLE_THREADS_IN_TCB
|
||
|
MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads)
|
||
|
#endif
|