dl-tls.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* Thread-local storage handling in the ELF dynamic linker. NDS32 version.
  2. Copyright (C) 2013 Free Software Foundation, Inc.
  3. The GNU C Library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Lesser General Public
  5. License as published by the Free Software Foundation; either
  6. version 2.1 of the License, or (at your option) any later version.
  7. The GNU C Library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public
  12. License along with the GNU C Library; if not, see
  13. <http://www.gnu.org/licenses/>. */
  14. #ifndef _NDS32_DL_TLS_H
  15. #define _NDS32_DL_TLS_H 1
  16. /* Type used to represent a TLS descriptor. */
  17. struct tlsdesc
  18. {
  19. ptrdiff_t (*entry)(struct tlsdesc *);
  20. union
  21. {
  22. void *pointer;
  23. long value;
  24. } argument;
  25. };
  26. /* Type used for the representation of TLS information in the GOT. */
  27. typedef struct
  28. {
  29. unsigned long int ti_module;
  30. unsigned long int ti_offset;
  31. } tls_index;
  32. /* Type used as the argument in a TLS descriptor for a symbol that
  33. * needs dynamic TLS offsets. */
  34. struct tlsdesc_dynamic_arg
  35. {
  36. tls_index tlsinfo;
  37. size_t gen_count;
  38. };
  39. extern void *__tls_get_addr (tls_index *ti);
  40. extern ptrdiff_t attribute_hidden
  41. _dl_tlsdesc_return(struct tlsdesc_dynamic_arg *);
  42. extern void *_dl_make_tlsdesc_dynamic (struct link_map *map, size_t ti_offset);
  43. extern ptrdiff_t attribute_hidden
  44. _dl_tlsdesc_dynamic(struct tlsdesc *);
  45. #endif //_NDS32_DL_TLS_H