Lines Matching full:stack
14 * @brief Thread Stack APIs
16 * @defgroup thread_stack_api Thread Stack APIs
36 * declared symbol for a stack (of type k_thread_stack_t) and the underlying
37 * buffer which composes the stack data actually used by the underlying
39 * stack buffer region with guard areas that trigger a MPU or MMU fault
60 * @brief Properly align a CPU stack pointer value
66 * @param ptr Proposed stack pointer address
67 * @return Properly aligned stack pointer address
76 * @brief Helper macro for getting a stack frame struct
81 * Given a type and an initial stack pointer, return a properly cast
84 * @param type Type of the initial stack frame struct
85 * @param ptr Initial aligned stack pointer value
86 * @return Pointer to stack frame struct within the stack buffer
116 * @brief Declare a reference to a thread stack
118 * This macro declares the symbol of a thread stack defined elsewhere in the
121 * @param sym Thread stack symbol name
122 * @param size Size of the stack memory region
129 * @brief Declare a reference to a thread stack array
131 * This macro declares the symbol of a thread stack array defined elsewhere in
134 * @param sym Thread stack symbol name
136 * @param size Size of the stack memory region
143 * @brief Declare a reference to a pinned thread stack array
145 * This macro declares the symbol of a pinned thread stack array defined
148 * @param sym Thread stack symbol name
150 * @param size Size of the stack memory region
157 * @brief Define a toplevel kernel stack memory region in specified section
159 * This defines a region of memory for use as a thread stack in
169 * fixed-size stack overflow guards.
171 * @param sym Thread stack symbol name
172 * @param size Size of the stack memory region
173 * @param lsect Linker section for this stack
181 * @brief Define a toplevel array of kernel stack memory regions in specified section
183 * @param sym Kernel stack array symbol name
185 * @param size Size of the stack memory region
194 * @brief Define a toplevel kernel stack memory region
196 * This defines a region of memory for use as a thread stack, for threads
209 * fixed-size stack overflow guards.
211 * @param sym Thread stack symbol name
212 * @param size Size of the stack memory region
218 * @brief Define a toplevel kernel stack memory region in pinned section
222 * This puts the stack into the pinned noinit linker section if
224 * put the stack into the same section as K_KERNEL_STACK_DEFINE().
226 * @param sym Thread stack symbol name
227 * @param size Size of the stack memory region
238 * @brief Define a toplevel array of kernel stack memory regions
242 * @param sym Kernel stack array symbol name
244 * @param size Size of the stack memory region
250 * @brief Define a toplevel array of kernel stack memory regions in pinned section
254 * This puts the stack into the pinned noinit linker section if
256 * put the stack into the same section as K_KERNEL_STACK_ARRAY_DEFINE().
258 * @param sym Kernel stack array symbol name
260 * @param size Size of the stack memory region
271 * @brief Define an embedded stack memory region
276 * @param sym Thread stack symbol name
277 * @param size Size of the stack memory region
304 * @brief Indicate how much additional memory is reserved for stack objects
306 * Any given stack declaration may have additional memory in it for guard
310 * This value only indicates memory that is permanently reserved in the stack
311 * object. Memory that is "borrowed" from the thread's stack buffer is never
314 * Reserved memory is at the beginning of the stack object. The reserved area
315 * must be appropriately sized such that the stack buffer immediately following
325 * @brief Properly align the lowest address of a stack object
327 * Return an alignment value for the lowest address of a stack object, taking
330 * reserved platform data within the stack object. This will always be at least
346 * @param size Requested size of the stack buffer (which could be ignored)
347 * @return Alignment of the stack object
357 * @brief Round up a requested stack size to satisfy constraints
359 * Given a requested stack buffer size, return an adjusted size value for
360 * the entire stack object which takes into consideration:
363 * - Alignment of stack buffer bounds to CPU/ABI constraints
364 * - Alignment of stack buffer bounds to satisfy memory management hardware
365 * constraints such that a protection region can cover the stack buffer area
367 * If CONFIG_USERSPACE is enabled, this determines the size of stack objects
379 * @param size Requested size of the stack buffer
380 * @return Adjusted size of the stack object
396 * @brief Declare a reference to a thread stack
398 * This macro declares the symbol of a thread stack defined elsewhere in the
401 * @param sym Thread stack symbol name
402 * @param size Size of the stack memory region
409 * @brief Declare a reference to a thread stack array
411 * This macro declares the symbol of a thread stack array defined elsewhere in
414 * @param sym Thread stack symbol name
416 * @param size Size of the stack memory region
423 * @brief Return the size in bytes of a stack memory region
425 * Convenience macro for passing the desired stack size to k_thread_create()
431 * pass to k_thread_create() for the associated stack object.
433 * @param sym Stack memory symbol
434 * @return Size of the stack buffer
439 * @brief Define a toplevel thread stack memory region in specified region
441 * This defines a region of memory suitable for use as a thread's stack
458 * Some arches may round the size of the usable stack region up to satisfy
462 * @param sym Thread stack symbol name
463 * @param size Size of the stack memory region
464 * @param lsect Linker section for this stack
472 * @brief Define a toplevel array of thread stack memory regions in specified region
480 * @param sym Thread stack symbol name
482 * @param size Size of the stack memory region
483 * @param lsect Linker section for this stack
491 * @brief Define a toplevel thread stack memory region
493 * This defines a region of memory suitable for use as a thread's stack.
509 * Some arches may round the size of the usable stack region up to satisfy
513 * @param sym Thread stack symbol name
514 * @param size Size of the stack memory region
520 * @brief Define a toplevel thread stack memory region in pinned section
522 * This defines a region of memory suitable for use as a thread's stack.
538 * Some arches may round the size of the usable stack region up to satisfy
542 * This puts the stack into the pinned noinit linker section if
544 * put the stack into the same section as K_THREAD_STACK_DEFINE().
546 * @param sym Thread stack symbol name
547 * @param size Size of the stack memory region
558 * @brief Calculate size of stacks to be allocated in a stack array
561 * inside a stack array. It accepts the indicated "size" as a parameter
565 * required stack base alignment.
567 * @param size Size of the stack memory region
575 * @brief Define a toplevel array of thread stack memory regions
583 * @param sym Thread stack symbol name
585 * @param size Size of the stack memory region
591 * @brief Define a toplevel array of thread stack memory regions in pinned section
599 * This puts the stack into the pinned noinit linker section if
601 * put the stack into the same section as K_THREAD_STACK_DEFINE().
603 * @param sym Thread stack symbol name
605 * @param size Size of the stack memory region
618 * @brief Get a pointer to the physical stack buffer
620 * Obtain a pointer to the non-reserved area of a stack object.
622 * this does not account for any memory carved-out for MPU stack overflow
625 * Use with care. The true bounds of the stack buffer are available in the
628 * @param sym defined stack symbol name