mirror of
https://github.com/Dasharo/zephyr.git
synced 2026-03-06 14:57:20 -08:00
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:
committed by
Anas Nashif
parent
beee999cf4
commit
b208e5811e
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user