dl-tls.h 1.8 KB

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