kernel: update stack macro documentation
It's not possible to enforce that K_THREAD_STACK_SIZEOF() returns the original number passed to K_THREAD_STACK_DEFINE(). Some arches need to round this number up in order to satisfy alignment constraints. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
75e2af20ea
commit
e2d779159f
1 changed files with 6 additions and 6 deletions
|
@ -4625,6 +4625,10 @@ static inline char *K_THREAD_STACK_BUFFER(k_thread_stack_t *sym)
|
|||
* parameter of k_thread_create(), it may not be the same as the
|
||||
* 'size' parameter. Use K_THREAD_STACK_SIZEOF() instead.
|
||||
*
|
||||
* Some arches may round the size of the usable stack region up to satisfy
|
||||
* alignment constraints. K_THREAD_STACK_SIZEOF() will return the aligned
|
||||
* size.
|
||||
*
|
||||
* @param sym Thread stack symbol name
|
||||
* @param size Size of the stack memory region
|
||||
* @req K-TSTACK-001
|
||||
|
@ -4673,12 +4677,8 @@ static inline char *K_THREAD_STACK_BUFFER(k_thread_stack_t *sym)
|
|||
* since the underlying implementation may actually create something larger
|
||||
* (for instance a guard area).
|
||||
*
|
||||
* The value returned here is guaranteed to match the 'size' parameter
|
||||
* passed to K_THREAD_STACK_DEFINE.
|
||||
*
|
||||
* Do not use this for stacks declared with K_THREAD_STACK_ARRAY_DEFINE(),
|
||||
* it is not guaranteed to return the original value since each array
|
||||
* element must be aligned.
|
||||
* The value returned here is not guaranteed to match the 'size' parameter
|
||||
* passed to K_THREAD_STACK_DEFINE and may be larger.
|
||||
*
|
||||
* @param sym Stack memory symbol
|
||||
* @return Size of the stack
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue