Changes in uspace/lib/c/arch/amd64/src/tls.c [ae7d03c:d3e938c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/amd64/src/tls.c
rae7d03c rd3e938c 38 38 #include <stddef.h> 39 39 40 #ifdef CONFIG_RTLD 41 #include <rtld/rtld.h> 42 #endif 43 40 44 tcb_t *tls_alloc_arch(size_t size, size_t align) 41 45 { … … 48 52 } 49 53 54 /* 55 * Rtld TLS support 56 */ 57 58 typedef struct { 59 unsigned long int ti_module; 60 unsigned long int ti_offset; 61 } tls_index; 62 63 void __attribute__((__regparm__(1))) 64 *__tls_get_addr(tls_index *ti); 65 66 void __attribute__((__regparm__(1))) 67 *__tls_get_addr(tls_index *ti) 68 { 69 uint8_t *tls; 70 71 #ifdef CONFIG_RTLD 72 if (runtime_env != NULL) { 73 return rtld_tls_get_addr(runtime_env, __tcb_get(), 74 ti->ti_module, ti->ti_offset); 75 } 76 #endif 77 /* Get address of static TLS block */ 78 tls = tls_get(); 79 return tls + ti->ti_offset; 80 } 81 50 82 /** @} 51 83 */
Note:
See TracChangeset
for help on using the changeset viewer.