23 #ifndef _RTEMS_SCORE_TLS_H 24 #define _RTEMS_SCORE_TLS_H 47 extern char _TLS_Data_begin[];
49 extern char _TLS_Data_end[];
51 extern char _TLS_Data_size[];
53 extern char _TLS_BSS_begin[];
55 extern char _TLS_BSS_end[];
57 extern char _TLS_BSS_size[];
59 extern char _TLS_Size[];
78 uint32_t generation_number;
92 #if CPU_SIZEOF_POINTER == 4 || defined(AARCH64_MULTILIB_ARCH_V8) 117 size = (uintptr_t) _TLS_Size;
133 return (val + msk) & ~msk;
172 (
size_t) ((uintptr_t)_TLS_Data_size)
177 (
char *) tls_area + (
size_t)((intptr_t) _TLS_BSS_begin) -
178 (
size_t)((intptr_t) _TLS_Data_begin),
180 ((
size_t) (intptr_t)_TLS_BSS_size)
207 dtv->generation_number = 1;
208 dtv->tls_blocks[0] = tls_block;
227 void *tls_block = (
char *) tls_area
232 ((
char *) tls_block + aligned_size);
250 void *tls_block = (
char *) tls_area
253 ((
char *) tls_block -
sizeof(*tcb));
256 ((
char *) tls_block + aligned_size);
274 uintptr_t size = (uintptr_t) _TLS_Size;
276 uintptr_t tls_mask = tls_align - 1;
278 uintptr_t heap_mask = heap_align - 1;
280 ((
char *) tls_area + ((size + heap_mask) & ~heap_mask));
281 void *tls_block = (
char *) tcb - ((size + tls_mask) & ~tls_mask);
283 ((
char *) tcb +
sizeof(*tcb));
static void * _TLS_Initialize(void *tls_block, TLS_Thread_control_block *tcb, TLS_Dynamic_thread_vector *dtv)
Initializes the dynamic thread vector.
uintptr_t _TLS_Get_allocation_size(void)
Return the TLS area allocation size.
char _TLS_Alignment[]
The TLS section alignment.
static uintptr_t _TLS_Get_size(void)
Gets the TLS size.
static void * _TLS_TCB_before_TLS_block_initialize(void *tls_area)
Initializes a dynamic thread vector with the area before a given starting address as thread control b...
SPARC CPU Department Source.
#define CPU_HEAP_ALIGNMENT
static void * _TLS_TCB_at_area_begin_initialize(void *tls_area)
Initializes a dynamic thread vector beginning at the given starting address.
#define RTEMS_OBFUSCATE_VARIABLE(_var)
Obfuscates the variable so that the compiler cannot perform optimizations based on the variable value...
static uintptr_t _TLS_Heap_align_up(uintptr_t val)
Returns the value aligned up to the heap alignment.
static void * _TLS_TCB_after_TLS_block_initialize(void *tls_area)
Initializes a dynamic thread vector with the area after a given starting address as thread control bl...
static void * _TLS_Copy_and_clear(void *tls_area)
Copies TLS size bytes from the address tls_area and returns a pointer to the start of the area after ...
static uintptr_t _TLS_Get_thread_control_block_area_size(uintptr_t alignment)
Returns the size of the thread control block area size for this alignment, or the minimum size if ali...