kernel: dynamic: Optimize stack pool usage
Add the flags parameter to the z_thread_stack_alloc_pool function.
Determine the maximum possible stack size based on the size of the reserved
memory for stack and the thread type (flags).
The stack size that can be used by a thread depend on its type
(kerner/user). For the same stack size, the macros K_KERNEL_STACK_DECLARE
and K_THREAD_STACK_DEFINE may reserve different amount of memory.
Signed-off-by:
Adrian Warecki <adrian.warecki@intel.com>
Loading
Please sign in to comment