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