kernel: add a new API for setting thread names
Added k_thread_name_set() and enable thread name setting when declaring static threads. This is enabled only when THREAD_MONITOR is used. System threads get a name by default. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
3a117c220a
commit
57554055d2
8 changed files with 113 additions and 24 deletions
|
@ -236,6 +236,10 @@ static ALWAYS_INLINE void _new_thread_init(struct k_thread *thread,
|
|||
thread->custom_data = NULL;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_THREAD_NAME
|
||||
thread->name = NULL;
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_USERSPACE)
|
||||
thread->mem_domain_info.mem_domain = NULL;
|
||||
#endif /* CONFIG_USERSPACE */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue