123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #include <link.h>
- #include "thread_dbP.h"
- td_err_e
- td_thr_tls_get_addr (const td_thrhandle_t *th __attribute__ ((unused)),
- void *map_address __attribute__ ((unused)),
- size_t offset __attribute__ ((unused)),
- void **address __attribute__ ((unused)))
- {
- #if USE_TLS
-
- size_t modid;
- if (ps_pdread (th->th_ta_p->ph,
- &((struct link_map *) map_address)->l_tls_modid,
- &modid, sizeof modid) != PS_OK)
- return TD_ERR;
- td_err_e result = td_thr_tlsbase (th, modid, address);
- if (result == TD_OK)
- *address += offset;
- return result;
- #else
- return TD_ERR;
- #endif
- }
|