Changes in uspace/lib/libc/arch/ia32/src/tls.c [1ea99cc:fa23560] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/arch/ia32/src/tls.c
r1ea99cc rfa23560 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 //#ifdef __SHARED__52 53 typedef struct {54 unsigned long int ti_module;55 unsigned long int ti_offset;56 } tls_index;57 58 void __attribute__ ((__regparm__ (1)))59 *___tls_get_addr(tls_index *ti);60 61 void __attribute__ ((__regparm__ (1)))62 *___tls_get_addr(tls_index *ti)63 {64 size_t tls_size;65 uint8_t *tls;66 67 /* Calculate size of TLS block */68 tls_size = ALIGN_UP(&_tbss_end - &_tdata_start, &_tls_alignment);69 70 /* The TLS block is just before TCB */71 tls = (uint8_t *)__tcb_get() - tls_size;72 73 return tls + ti->ti_offset;74 }75 76 //#endif77 78 50 /** @} 79 51 */
Note:
See TracChangeset
for help on using the changeset viewer.