Changes in uspace/lib/c/arch/ia32/src/tls.c [7f9bc04:63f8966] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/ia32/src/tls.c
r7f9bc04 r63f8966 37 37 #include <tls.h> 38 38 #include <sys/types.h> 39 #include <align.h>40 39 41 40 tcb_t * __alloc_tls(void **data, size_t size) … … 49 48 } 50 49 51 /*52 * Rtld TLS support53 */54 55 typedef struct {56 unsigned long int ti_module;57 unsigned long int ti_offset;58 } tls_index;59 60 void __attribute__ ((__regparm__ (1)))61 *___tls_get_addr(tls_index *ti);62 63 void __attribute__ ((__regparm__ (1)))64 *___tls_get_addr(tls_index *ti)65 {66 size_t tls_size;67 uint8_t *tls;68 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 75 return tls + ti->ti_offset;76 }77 78 50 /** @} 79 51 */
Note:
See TracChangeset
for help on using the changeset viewer.