kernel/swap: Initialize dummy thread's resource pool
The resource pool of the short-lived dummy thread "stub" may be inherited by other threads created during system initialization. This commit initializes this resource pool to NULL or the system pool to ensure that a well-defined resource pool propagates to other threads that inherit it from the dummy thread. Fixes #41482. Signed-off-by: Berend Ozceri <berend@recogni.com>
This commit is contained in:
parent
beee999cf4
commit
b208e5811e
1 changed files with 5 additions and 0 deletions
|
@ -225,6 +225,11 @@ static inline void z_dummy_thread_init(struct k_thread *dummy_thread)
|
|||
#ifdef CONFIG_USERSPACE
|
||||
dummy_thread->mem_domain_info.mem_domain = &k_mem_domain_default;
|
||||
#endif
|
||||
#if (CONFIG_HEAP_MEM_POOL_SIZE > 0)
|
||||
k_thread_system_pool_assign(dummy_thread);
|
||||
#else
|
||||
dummy_thread->resource_pool = NULL;
|
||||
#endif
|
||||
|
||||
_current_cpu->current = dummy_thread;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue