Changeset 03e4d1e9 in rtems
- Timestamp:
- 06/29/22 12:37:47 (6 weeks ago)
- Branches:
- master
- Children:
- eefaf068
- Parents:
- 9dd4bd3
- git-author:
- Sebastian Huber <sebastian.huber@…> (06/29/22 12:37:47)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (07/04/22 06:30:42)
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/score/cpu/aarch64/include/rtems/score/cpuimpl.h
r9dd4bd3 r03e4d1e9 163 163 } 164 164 165 RTEMS_INLINE_ROUTINE void _CPU_Use_thread_local_storage( 166 const Context_Control *context 167 ) 168 { 169 __asm__ volatile ( 170 "msr TPIDR_EL0, %0" : : "r" ( context->thread_id ) : "memory" 171 ); 172 } 173 165 174 #ifdef __cplusplus 166 175 } -
cpukit/score/cpu/arm/include/rtems/score/cpuimpl.h
r9dd4bd3 r03e4d1e9 161 161 } 162 162 163 RTEMS_INLINE_ROUTINE void _CPU_Use_thread_local_storage( 164 const Context_Control *context 165 ) 166 { 167 #ifdef ARM_MULTILIB_HAS_THREAD_ID_REGISTER 168 __asm__ volatile ( 169 "mcr p15, 0, %0, c13, c0, 3" : : "r" ( context->thread_id ) : "memory" 170 ); 171 #else 172 (void) context; 173 #endif 174 } 175 163 176 #ifdef __cplusplus 164 177 } -
cpukit/score/cpu/bfin/include/rtems/score/cpuimpl.h
r9dd4bd3 r03e4d1e9 60 60 } 61 61 62 RTEMS_INLINE_ROUTINE void _CPU_Use_thread_local_storage( 63 const Context_Control *context 64 ) 65 { 66 (void) context; 67 } 68 62 69 #ifdef __cplusplus 63 70 } -
cpukit/score/cpu/i386/include/rtems/score/cpuimpl.h
r9dd4bd3 r03e4d1e9 81 81 } 82 82 83 RTEMS_INLINE_ROUTINE void _CPU_Use_thread_local_storage( 84 const Context_Control *context 85 ) 86 { 87 uint32_t tmp; 88 uint32_t cpu_index; 89 90 #ifdef RTEMS_SMP 91 cpu_index = _CPU_SMP_Get_current_processor(); 92 #else 93 cpu_index = 0; 94 #endif 95 96 __asm__ volatile ( 97 "movl " RTEMS_XSTRING( I386_CONTEXT_CONTROL_GS_0_OFFSET ) "(%2), %0\n" 98 "movl %0, _Global_descriptor_table+24(,%1,8)\n" 99 "movl " RTEMS_XSTRING( I386_CONTEXT_CONTROL_GS_1_OFFSET ) "(%2), %0\n" 100 "movl %0, _Global_descriptor_table+28(,%1,8)\n" 101 "leal 24(,%1,8), %0\n" 102 "movl %0, %%gs\n" 103 : "=&r" ( tmp ) 104 : "r" ( cpu_index ), "r" ( context ) 105 : "memory" 106 ); 107 } 108 83 109 #ifdef __cplusplus 84 110 } -
cpukit/score/cpu/lm32/include/rtems/score/cpuimpl.h
r9dd4bd3 r03e4d1e9 59 59 } 60 60 61 RTEMS_INLINE_ROUTINE void _CPU_Use_thread_local_storage( 62 const Context_Control *context 63 ) 64 { 65 (void) context; 66 } 67 61 68 #ifdef __cplusplus 62 69 } -
cpukit/score/cpu/m68k/include/rtems/score/cpuimpl.h
r9dd4bd3 r03e4d1e9 79 79 } 80 80 81 RTEMS_INLINE_ROUTINE void _CPU_Use_thread_local_storage( 82 const Context_Control *context 83 ) 84 { 85 /* 86 * There is nothing to do since the thread-local storage area is obtained by 87 * calling __m68k_read_tp(). 88 */ 89 (void) context; 90 } 91 81 92 #ifdef __cplusplus 82 93 } -
cpukit/score/cpu/microblaze/include/rtems/score/cpuimpl.h
r9dd4bd3 r03e4d1e9 87 87 } 88 88 89 RTEMS_INLINE_ROUTINE void _CPU_Use_thread_local_storage( 90 const Context_Control *context 91 ) 92 { 93 /* 94 * There is nothing to do since the thread-local storage area is obtained by 95 * calling __tls_get_addr(). 96 */ 97 (void) context; 98 } 99 89 100 #ifdef __cplusplus 90 101 } -
cpukit/score/cpu/mips/include/rtems/score/cpuimpl.h
r9dd4bd3 r03e4d1e9 79 79 } 80 80 81 RTEMS_INLINE_ROUTINE void _CPU_Use_thread_local_storage( 82 const Context_Control *context 83 ) 84 { 85 (void) context; 86 } 87 81 88 #ifdef __cplusplus 82 89 } -
cpukit/score/cpu/moxie/include/rtems/score/cpuimpl.h
r9dd4bd3 r03e4d1e9 79 79 } 80 80 81 RTEMS_INLINE_ROUTINE void _CPU_Use_thread_local_storage( 82 const Context_Control *context 83 ) 84 { 85 (void) context; 86 } 87 81 88 #ifdef __cplusplus 82 89 } -
cpukit/score/cpu/nios2/include/rtems/score/cpuimpl.h
r9dd4bd3 r03e4d1e9 71 71 } 72 72 73 RTEMS_INLINE_ROUTINE void _CPU_Use_thread_local_storage( 74 const Context_Control *context 75 ) 76 { 77 register uint32_t r23 __asm__( "r23" ); 78 79 r23 = context->r23; 80 81 /* Make sure that the register assignment is not optimized away */ 82 __asm__ volatile ( "" : : "r" ( r23 ) ); 83 } 84 73 85 #ifdef __cplusplus 74 86 } -
cpukit/score/cpu/no_cpu/include/rtems/score/cpuimpl.h
r9dd4bd3 r03e4d1e9 167 167 } 168 168 169 /** 170 * @brief Uses the thread-local storage area of the context. 171 * 172 * Some architectures may use dedicated registers to reference the thread-local 173 * storage area of the associated thread. This function should set these 174 * registers to the values defined by the specified processor context. 175 * 176 * @param context is the processor context defining the thread-local storage 177 * area to use. 178 */ 179 RTEMS_INLINE_ROUTINE void _CPU_Use_thread_local_storage( 180 const Context_Control *context 181 ) 182 { 183 (void) context; 184 } 185 169 186 #ifdef __cplusplus 170 187 } -
cpukit/score/cpu/or1k/include/rtems/score/cpuimpl.h
r9dd4bd3 r03e4d1e9 71 71 } 72 72 73 RTEMS_INLINE_ROUTINE void _CPU_Use_thread_local_storage( 74 const Context_Control *context 75 ) 76 { 77 (void) context; 78 } 79 73 80 #ifdef __cplusplus 74 81 } -
cpukit/score/cpu/powerpc/include/rtems/score/cpuimpl.h
r9dd4bd3 r03e4d1e9 284 284 } 285 285 286 RTEMS_INLINE_ROUTINE void _CPU_Use_thread_local_storage( 287 const Context_Control *context 288 ) 289 { 290 #ifdef __powerpc64__ 291 register uintptr_t tp __asm__( "13" ); 292 #else 293 register uintptr_t tp __asm__( "2" ); 294 #endif 295 296 tp = ppc_get_context( context )->tp; 297 298 /* Make sure that the register assignment is not optimized away */ 299 __asm__ volatile ( "" : : "r" ( tp ) ); 300 } 301 286 302 #ifdef __cplusplus 287 303 } -
cpukit/score/cpu/riscv/include/rtems/score/cpuimpl.h
r9dd4bd3 r03e4d1e9 431 431 } 432 432 433 RTEMS_INLINE_ROUTINE void _CPU_Use_thread_local_storage( 434 const Context_Control *context 435 ) 436 { 437 register uintptr_t tp __asm__( "tp" ); 438 439 tp = context->tp; 440 441 /* Make sure that the register assignment is not optimized away */ 442 __asm__ volatile ( "" : : "r" ( tp ) ); 443 } 444 433 445 #ifdef __cplusplus 434 446 } -
cpukit/score/cpu/sh/include/rtems/score/cpuimpl.h
r9dd4bd3 r03e4d1e9 60 60 } 61 61 62 RTEMS_INLINE_ROUTINE void _CPU_Use_thread_local_storage( 63 const Context_Control *context 64 ) 65 { 66 (void) context; 67 } 68 62 69 #ifdef __cplusplus 63 70 } -
cpukit/score/cpu/sparc/include/rtems/score/cpuimpl.h
r9dd4bd3 r03e4d1e9 235 235 } 236 236 237 RTEMS_INLINE_ROUTINE void _CPU_Use_thread_local_storage( 238 const Context_Control *context 239 ) 240 { 241 register uint32_t g7 __asm__( "g7" ); 242 243 g7 = context->g7; 244 245 /* Make sure that the register assignment is not optimized away */ 246 __asm__ volatile ( "" : : "r" ( g7 ) ); 247 } 248 237 249 #ifdef __cplusplus 238 250 } -
cpukit/score/cpu/sparc64/include/rtems/score/cpuimpl.h
r9dd4bd3 r03e4d1e9 79 79 } 80 80 81 RTEMS_INLINE_ROUTINE void _CPU_Use_thread_local_storage( 82 const Context_Control *context 83 ) 84 { 85 (void) context; 86 } 87 81 88 #ifdef __cplusplus 82 89 } -
cpukit/score/cpu/v850/include/rtems/score/cpuimpl.h
r9dd4bd3 r03e4d1e9 79 79 } 80 80 81 RTEMS_INLINE_ROUTINE void _CPU_Use_thread_local_storage( 82 const Context_Control *context 83 ) 84 { 85 (void) context; 86 } 87 81 88 #ifdef __cplusplus 82 89 } -
cpukit/score/cpu/x86_64/include/rtems/score/cpuimpl.h
r9dd4bd3 r03e4d1e9 63 63 } 64 64 65 RTEMS_INLINE_ROUTINE void _CPU_Use_thread_local_storage( 66 const Context_Control *context 67 ) 68 { 69 (void) context; 70 } 71 65 72 #ifdef __cplusplus 66 73 } -
cpukit/score/src/threadcreateidle.c
r9dd4bd3 r03e4d1e9 41 41 42 42 #include <rtems/score/threadidledata.h> 43 #include <rtems/score/cpuimpl.h> 43 44 #include <rtems/score/threadimpl.h> 44 45 #include <rtems/score/assert.h> … … 125 126 } 126 127 } 128 129 _CPU_Use_thread_local_storage( 130 &_Per_CPU_Get_executing( _Per_CPU_Get() )->Registers 131 ); 127 132 } -
testsuites/sptests/sptls01/init.c
r9dd4bd3 r03e4d1e9 2 2 3 3 /* 4 * Copyright ( c) 2014 embedded brains GmbH. All rights reserved.4 * Copyright (C) 2014, 2022 embedded brains GmbH 5 5 * 6 6 * Redistribution and use in source and binary forms, with or without … … 30 30 #endif 31 31 32 #include <stdio.h> 32 #include <rtems/bspIo.h> 33 #include <rtems/sysinit.h> 33 34 34 35 #include "tmacros.h" … … 46 47 static void check_tls_item(uint32_t expected) 47 48 { 48 print f("TLS item = %i\n", tls_item);49 printk("TLS item = %i\n", tls_item); 49 50 rtems_test_assert(tls_item == expected); 50 51 } … … 98 99 } 99 100 100 static void Init(rtems_task_argument arg)101 static void test_idle_during_system_init(void) 101 102 { 102 103 TEST_BEGIN(); 103 104 105 check_tls_item(123); 106 } 107 108 static void Init(rtems_task_argument arg) 109 { 104 110 test(); 105 111 … … 108 114 rtems_test_exit(0); 109 115 } 116 117 RTEMS_SYSINIT_ITEM( 118 test_idle_during_system_init, 119 RTEMS_SYSINIT_IDLE_THREADS, 120 RTEMS_SYSINIT_ORDER_LAST 121 ); 110 122 111 123 #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
Note: See TracChangeset
for help on using the changeset viewer.