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/.github
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
..
ISSUE_TEMPLATE Update feature_request.md (#500) 3 years ago
actions Check: improve verbosity of url verifier (#260) 4 years ago
scripts Add RP2040 support (#341) 4 years ago
workflows Update codecov action to v3.1.0 3 years ago
CODEOWNERS Added CODEOWNERS file (#209) 4 years ago
CONTRIBUTING.md Run uncrustify with github workflows (#369) 4 years ago
SECURITY.md Move markdown files and lexicon into .github directory (#205) 4 years ago
lexicon.txt Generalize Thread Local Storage (TLS) support (#540) 3 years ago
pull_request_template.md Create pull_request_template.md 5 years ago
uncrustify.cfg Update uncrustify configuration to 0.69 (#445) 3 years ago