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