12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- #include "thread_data.h"
- typedef struct
- {
- unsigned long int ti_module;
- unsigned long int ti_offset;
- } tls_index;
- #if defined SE_GNU32
- void * __attribute__((__regparm__(1))) ___tls_get_addr(tls_index *ti)
- #elif defined SE_GNU64
- void *__tls_get_addr(tls_index *ti)
- #endif
- {
- thread_data_t *thread_data = get_thread_data();
- return (unsigned char *)thread_data->tls_addr + ti->ti_offset;
- }
|