Skip to content
Commit 746c59c8 authored by Daniel Flodin's avatar Daniel Flodin Committed by Carles Cufí
Browse files

arch: kernel: lib: toolchain: Standardize TLS keyword



Up until now, the `__thread` keyword has been used for declaring
variables as Thread local storage. However, `__thread` is a GNU
specific keyword which thus limits compatibility with other
toolchains (for instance IAR).

This PR intoduces a new macro `Z_THREAD_LOCAL` which expands to the
corresponding C11, C23 or C++11 standard keyword based on the standard
that is specified during compilation, else it uses the old `__thread`
keyword.

Signed-off-by: default avatarDaniel Flodin <daniel.flodin@iar.com>
parent 62c0fc3e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment