Changes in uspace/lib/c/arch/ppc32/src/tls.c [eefdd7c:4f205248] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/ppc32/src/tls.c
reefdd7c r4f205248 1 1 /* 2 * Copyright (c) 2019 Jiri Svoboda3 2 * Copyright (c) 2006 Ondrej Palkovsky 4 3 * All rights reserved. … … 37 36 #include <stddef.h> 38 37 39 #ifdef CONFIG_RTLD40 #include <rtld/rtld.h>41 #endif42 43 38 tcb_t *tls_alloc_arch(size_t size, size_t align) 44 39 { … … 51 46 } 52 47 53 /*54 * Rtld TLS support55 */56 57 typedef struct {58 unsigned long int ti_module;59 unsigned long int ti_offset;60 } tls_index;61 62 int __tls_debug = 0;63 64 void *__tls_get_addr(tls_index *ti);65 66 void *__tls_get_addr(tls_index *ti)67 {68 uint8_t *tls;69 70 #ifdef CONFIG_RTLD71 if (runtime_env != NULL) {72 return rtld_tls_get_addr(runtime_env, __tcb_get(),73 ti->ti_module, ti->ti_offset) + 0x8000;74 }75 #endif76 /* Get address of static TLS block */77 tls = tls_get();78 return tls + ti->ti_offset + 0x8000;79 }80 81 48 /** @} 82 49 */
Note:
See TracChangeset
for help on using the changeset viewer.