Changeset 1ea99cc in mainline for uspace/lib/libc/arch/mips32/src/tls.c
- Timestamp:
- 2009-08-20T20:47:35Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b50b5af2
- Parents:
- 24edc18
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/arch/mips32/src/tls.c
r24edc18 r1ea99cc 47 47 } 48 48 49 typedef struct { 50 unsigned long ti_module; 51 unsigned long ti_offset; 52 } tls_index; 53 54 void *__tls_get_addr(tls_index *ti); 55 56 /* mips32 uses TLS variant 1 */ 57 void *__tls_get_addr(tls_index *ti) 58 { 59 uint8_t *tls; 60 uint32_t v; 61 62 tls = (uint8_t *)__tcb_get() + sizeof(tcb_t); 63 64 /* Hopefully this is right. No docs found. */ 65 v = (uint32_t) (tls + ti->ti_offset + 0x8000); 66 return (void *) v; 67 } 68 49 69 /** @} 50 70 */
Note:
See TracChangeset
for help on using the changeset viewer.