Changeset 7f9bc04 in mainline
- Timestamp:
- 2011-05-01T12:38:43Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e515a827
- Parents:
- 3f10d92
- Location:
- uspace/lib/c/arch
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/ia32/src/tls.c
r3f10d92 r7f9bc04 49 49 } 50 50 51 //#ifdef __SHARED__ 51 /* 52 * Rtld TLS support 53 */ 52 54 53 55 typedef struct { … … 74 76 } 75 77 76 //#endif77 78 78 /** @} 79 79 */ -
uspace/lib/c/arch/mips32/src/tls.c
r3f10d92 r7f9bc04 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 69 49 /** @} 70 50 */ -
uspace/lib/c/arch/ppc32/src/tls.c
r3f10d92 r7f9bc04 1 1 /* 2 2 * Copyright (c) 2006 Ondrej Palkovsky 3 * Copyright (c) 2008 Jiri Svoboda4 3 * All rights reserved. 5 4 * … … 35 34 36 35 #include <tls.h> 37 #include <align.h>38 36 #include <sys/types.h> 39 37 … … 48 46 } 49 47 50 /*51 static void kputint(unsigned i)52 {53 asm volatile (54 "mr %%r3, %0\n"55 "li %%r9, 32\n"56 "sc\n"57 :58 : "r" (i)59 : "%r3","%r9"60 ) ;61 }62 */63 64 typedef struct {65 unsigned long int ti_module;66 unsigned long int ti_offset;67 } tls_index;68 69 void *__tls_get_addr(tls_index *ti);70 71 /* ppc32 uses TLS variant 1 */72 void *__tls_get_addr(tls_index *ti)73 {74 uint8_t *tls;75 76 /* The TLS section is just after TCB */77 tls = (uint8_t *)__tcb_get() + sizeof(tcb_t);78 79 /* Hopefully this is right. No docs found. */80 return tls + ti->ti_offset + 32768;81 }82 83 48 /** @} 84 49 */
Note:
See TracChangeset
for help on using the changeset viewer.