uxInitialiseStackTLS() function
Allocate and initialize GCC TLS area This function allocates and initializes the area on the stack used to store GCC TLS (Thread Local Storage) variables. - The area's size is derived from the TLS section's linker variables, and rounded up to a multiple of 16 bytes - The allocated area is aligned to a 16-byte aligned address - The TLS variables in the area are then initialized Each task access the TLS variables using the THREADPTR register plus an offset to obtain the address of the variable. The value for the THREADPTR register is also calculated by this function, and that value should be use to initialize the THREADPTR register.
Arguments
uxStackPointer
Current stack pointer address
ret_threadptr_reg_init
Calculated THREADPTR register initialization value
Return value
Stack pointer that points to the TLS area
![]()
uxStackPointer = uxInitialiseStackTLS(uxStackPointer, &threadptr_reg_init);
uxInitialiseStackTLS() is called by 1 function:
![]()
uxInitialiseStackTLS()
uxInitialiseStackTLS():
![]()
uxInitialiseStackTLS()