kernel: add common bits to support TLS
This adds the common struct fields and functions to support the implementation of thread local storage in individual architecture. This uses the thread stack to store TLS data. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
3180fc0ecc
commit
02b20351cd
7 changed files with 97 additions and 0 deletions
|
@ -365,6 +365,11 @@ struct k_thread {
|
|||
/** resource pool */
|
||||
struct k_mem_pool *resource_pool;
|
||||
|
||||
#if defined(CONFIG_THREAD_LOCAL_STORAGE)
|
||||
/* Pointer to arch-specific TLS area */
|
||||
uintptr_t tls;
|
||||
#endif /* CONFIG_THREAD_LOCAL_STORAGE */
|
||||
|
||||
/** arch-specifics: must always be at the end */
|
||||
struct _thread_arch arch;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue