Changes in uspace/lib/c/arch/ia32/src/tls.c [31399f3:6adb775f] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/ia32/src/tls.c
r31399f3 r6adb775f 1 1 /* 2 2 * Copyright (c) 2006 Ondrej Palkovsky 3 * Copyright (c) 2016 Jiri Svoboda 3 4 * All rights reserved. 4 5 * … … 39 40 #include <align.h> 40 41 42 #ifdef CONFIG_RTLD 43 #include <rtld/rtld.h> 44 #endif 45 41 46 tcb_t *tls_alloc_arch(void **data, size_t size) 42 47 { … … 68 73 69 74 /* Calculate size of TLS block */ 70 tls_size = ALIGN_UP(&_tbss_end - &_tdata_start, &_tls_alignment);75 tls_size = tls_get_size(); 71 76 72 77 /* The TLS block is just before TCB */ 73 78 tls = (uint8_t *)__tcb_get() - tls_size; 74 79 80 #ifdef CONFIG_RTLD 81 if (runtime_env != NULL) { 82 return rtld_tls_get_addr(runtime_env, tls, ti->ti_module, 83 ti->ti_offset); 84 } 85 #endif 75 86 return tls + ti->ti_offset; 76 87 }
Note:
See TracChangeset
for help on using the changeset viewer.