You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
FreeRTOS-Kernel/include
Gaurav-Aggarwal-AWS 95669cc1a1
Generalize Thread Local Storage (TLS) support (#540)
* Generalize Thread Local Storage (TLS) support

FreeRTOS's Thread Local Storage (TLS) support used variables and
functions from newlib, thereby making the TLS support specific to
newlib. This commit generalizes the TLS support so that it can be used
with other c-runtime libraries also. The default behavior for newlib
support is still kept same for backward compatibility.

The application writer would need to set configUSE_C_RUNTIME_TLS_SUPPORT
to 1 in their FreeRTOSConfig.h and define the following macros to
support TLS for a c-runtime library:

1. configTLS_BLOCK_TYPE - Type used to define the TLS block in TCB.
2. configINIT_TLS_BLOCK( xTLSBlock ) - Allocate and initialize memory
   block for the task's TLS Block.
3. configSET_TLS_BLOCK( xTLSBlock ) - Switch C-Runtime's TLS Block to
   point to xTLSBlock.
4. configDEINIT_TLS_BLOCK( xTLSBlock ) - Free up the memory allocated
   for the task's TLS Block.

The following is an example to support TLS for picolibc:

 #define configUSE_C_RUNTIME_TLS_SUPPORT        1
 #define configTLS_BLOCK_TYPE                   void*
 #define configINIT_TLS_BLOCK( xTLSBlock )      _init_tls( xTLSBlock )
 #define configSET_TLS_BLOCK( xTLSBlock )       _set_tls( xTLSBlock )
 #define configDEINIT_TLS_BLOCK( xTLSBlock )

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
3 years ago
..
FreeRTOS.h Generalize Thread Local Storage (TLS) support (#540) 3 years ago
StackMacros.h Fix warning message error. (#443) 3 years ago
atomic.h Normalize files with mixed line endings (introduced in commit 3a413d1) 4 years ago
croutine.h Replace <pre> with @code - remaining files (#388) 4 years ago
deprecated_definitions.h Normalize files with mixed line endings (introduced in commit 3a413d1) 4 years ago
event_groups.h Fix some warnings in doxygen comments (#453) 3 years ago
list.h Add configUSE_MINI_LIST_ITEM configuration option to enable the MiniListItem_t type. (#433) 3 years ago
message_buffer.h Change type of message buffer handle (#537) 3 years ago
mpu_prototypes.h Add callback overrides for stream buffer and message buffers (#437) 3 years ago
mpu_wrappers.h Correct spelling mistake in mpu_wrappers.h 3 years ago
portable.h Declare vApplicationMallocFailedHook function in task.h instead in each C heap file (#483) 3 years ago
projdefs.h Normalize files with mixed line endings (introduced in commit 3a413d1) 4 years ago
queue.h queue.h: cTaskWokenByPost -> xTaskWokenByReceive (#491) 3 years ago
semphr.h Add configUSE_MUTEXES to function declarations in header (#504) 3 years ago
stack_macros.h Run uncrustify with github workflows (#369) 4 years ago
stdint.readme Normalize files with mixed line endings (introduced in commit 3a413d1) 4 years ago
stream_buffer.h Add callback overrides for stream buffer and message buffers (#437) 3 years ago
task.h Update documentation of uxTaskGetTaskNumber function (#460) 3 years ago
timers.h Clean some spell check words. (#439) 3 years ago