From 82b5940fa0ceba082a9ac7970eea589a531e6fc9 Mon Sep 17 00:00:00 2001 From: Andrew Boie Date: Thu, 23 Apr 2020 16:19:00 -0700 Subject: [PATCH] kernel: clarify k_thread_create() docs Thread objects were moved out of the stack a long time ago. Replacing this incorrect information is some clarification on acceptable size values to pass in. Signed-off-by: Andrew Boie --- include/kernel.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/kernel.h b/include/kernel.h index 9c700994239..c5a990d6d83 100644 --- a/include/kernel.h +++ b/include/kernel.h @@ -781,10 +781,9 @@ extern void k_thread_foreach_unlocked( * K_FP_REGS, and K_SSE_REGS. Multiple options may be specified by separating * them using "|" (the logical OR operator). * - * Historically, users often would use the beginning of the stack memory region - * to store the struct k_thread data, although corruption will occur if the - * stack overflows this region and stack protection features may not detect this - * situation. + * The stack_size parameter must be the same size value used when the stack + * object was defined, or the return value of K_THREAD_STACK_SIZEOF() on the + * stack object. * * @param new_thread Pointer to uninitialized struct k_thread * @param stack Pointer to the stack space.