dl-tls.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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; see the file COPYING.LIB. If
  14. not, see <http://www.gnu.org/licenses/>.  */
  15. #ifndef _XTENSA_DL_TLS_H
  16. #define _XTENSA_DL_TLS_H 1
  17. /* Type used for the representation of TLS information in the GOT. */
  18. typedef struct
  19. {
  20. unsigned long int ti_module;
  21. unsigned long int ti_offset;
  22. } tls_index;
  23. extern void *__tls_get_addr (tls_index *ti);
  24. /* Type used to represent a TLS descriptor. */
  25. struct tlsdesc
  26. {
  27. union
  28. {
  29. void *pointer;
  30. long value;
  31. } argument;
  32. ptrdiff_t (*entry)(struct tlsdesc *);
  33. };
  34. /* Type used as the argument in a TLS descriptor for a symbol that
  35. needs dynamic TLS offsets. */
  36. struct tlsdesc_dynamic_arg
  37. {
  38. tls_index tlsinfo;
  39. size_t gen_count;
  40. };
  41. extern ptrdiff_t attribute_hidden
  42. _dl_tlsdesc_return(struct tlsdesc_dynamic_arg *);
  43. extern void *_dl_make_tlsdesc_dynamic (struct link_map *map, size_t ti_offset);
  44. extern ptrdiff_t attribute_hidden
  45. _dl_tlsdesc_dynamic(struct tlsdesc_dynamic_arg *);
  46. #endif