Changeset d3e938c in mainline for uspace/lib/c/arch/amd64/src/tls.c
- Timestamp:
- 2019-01-08T13:27:05Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 05cb995, 1567471, 1aa9eff, cdec2a1
- Parents:
- 9c4df21
- git-author:
- Jiri Svoboda <jiri@…> (2018-01-07 22:27:02)
- git-committer:
- Jiri Svoboda <jiri@…> (2019-01-08 13:27:05)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/amd64/src/tls.c
r9c4df21 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.