Changeset 1c3c287 in mainline for uspace/lib/c/arch/sparc64
- Timestamp:
- 2019-01-14T16:52:47Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d4ceba0
- Parents:
- 8e3bc063
- git-author:
- Jiri Svoboda <jiri@…> (2018-01-19 19:52:43)
- git-committer:
- Jiri Svoboda <jiri@…> (2019-01-14 16:52:47)
- Location:
- uspace/lib/c/arch/sparc64
- Files:
-
- 5 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/sparc64/Makefile.common
r8e3bc063 r1c3c287 52 52 ifeq ($(PROCESSOR),sun4v) 53 53 DEFS += -DSUN4V 54 COMMON_CFLAGS += -Wl,-z,max-page-size=0x2000 55 else 56 COMMON_CFLAGS += -Wl,-z,max-page-size=0x4000 54 57 endif -
uspace/lib/c/arch/sparc64/Makefile.inc
r8e3bc063 r1c3c287 33 33 arch/$(UARCH)/src/tls.c \ 34 34 arch/$(UARCH)/src/stacktrace.c \ 35 arch/$(UARCH)/src/stacktrace_asm.S 35 arch/$(UARCH)/src/stacktrace_asm.S \ 36 arch/$(UARCH)/src/rtld/dynamic.c \ 37 arch/$(UARCH)/src/rtld/reloc.c 36 38 37 39 ARCH_AUTOCHECK_HEADERS = \ -
uspace/lib/c/arch/sparc64/include/libarch/tls.h
r8e3bc063 r1c3c287 46 46 void *self; 47 47 void *fibril_data; 48 void **dtv; 49 void *pad; 48 50 } tcb_t; 49 51 -
uspace/lib/c/arch/sparc64/src/tls.c
r8e3bc063 r1c3c287 38 38 #include <stddef.h> 39 39 40 #ifdef CONFIG_RTLD 41 #include <rtld/rtld.h> 42 #endif 43 40 44 tcb_t *tls_alloc_arch(size_t size, size_t align) 41 45 { … … 48 52 } 49 53 54 /* 55 * Rtld TLS support 56 */ 57 58 typedef struct { 59 unsigned long int ti_module; 60 unsigned long int ti_offset; 61 } tls_index; 62 63 void *__tls_get_addr(tls_index *ti); 64 65 void *__tls_get_addr(tls_index *ti) 66 { 67 uint8_t *tls; 68 69 #ifdef CONFIG_RTLD 70 if (runtime_env != NULL) { 71 return rtld_tls_get_addr(runtime_env, __tcb_get(), 72 ti->ti_module, ti->ti_offset); 73 } 74 #endif 75 /* Get address of static TLS block */ 76 tls = tls_get(); 77 return tls + ti->ti_offset; 78 } 79 50 80 /** @} 51 81 */
Note:
See TracChangeset
for help on using the changeset viewer.