dl-tls.h 1008 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * This file is subject to the terms and conditions of the LGPL V2.1
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 2019 Kalray Inc.
  7. */
  8. #ifndef _KVX_DL_TLS_H
  9. #define _KVX_DL_TLS_H 1
  10. /* Type used to represent a TLS descriptor in the GOT. */
  11. struct tlsdesc
  12. {
  13. ptrdiff_t (*entry) (struct tlsdesc *);
  14. void *arg;
  15. };
  16. typedef struct dl_tls_index
  17. {
  18. unsigned long int ti_module;
  19. unsigned long int ti_offset;
  20. } tls_index;
  21. /* Type used as the argument in a TLS descriptor for a symbol that
  22. needs dynamic TLS offsets. */
  23. struct tlsdesc_dynamic_arg
  24. {
  25. tls_index tlsinfo;
  26. size_t gen_count;
  27. };
  28. extern ptrdiff_t attribute_hidden
  29. _dl_tlsdesc_return (struct tlsdesc *);
  30. # ifdef SHARED
  31. extern void *_dl_make_tlsdesc_dynamic (struct link_map *, size_t);
  32. extern ptrdiff_t attribute_hidden
  33. _dl_tlsdesc_dynamic (struct tlsdesc *);
  34. # endif
  35. extern void *__tls_get_addr (tls_index *ti);
  36. #define TLS_DTV_UNALLOCATED ((void *) -1l)
  37. #endif