arm: remove duplicate stack macro docs
These intefaces are already documented in kernel.h. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
d6eaf5f7e9
commit
02f64c6846
1 changed files with 0 additions and 89 deletions
|
@ -120,26 +120,6 @@ extern "C" {
|
|||
1 << (31 - __builtin_clz(x) + 1) : \
|
||||
1 << (31 - __builtin_clz(x)))
|
||||
|
||||
/**
|
||||
* @brief Declare a top level thread stack memory region
|
||||
*
|
||||
* This declares a region of memory suitable for use as a thread's stack.
|
||||
*
|
||||
* This is the generic, historical definition. Align to STACK_ALIGN_SIZE and
|
||||
* put in * 'noinit' section so that it isn't zeroed at boot
|
||||
*
|
||||
* The declared symbol will always be a character array which can be passed to
|
||||
* k_thread_create, but should otherwise not be manipulated.
|
||||
*
|
||||
* It is legal to precede this definition with the 'static' keyword.
|
||||
*
|
||||
* It is NOT legal to take the sizeof(sym) and pass that to the stackSize
|
||||
* parameter of k_thread_create(), it may not be the same as the
|
||||
* 'size' parameter. Use K_THREAD_STACK_SIZEOF() instead.
|
||||
*
|
||||
* @param sym Thread stack symbol name
|
||||
* @param size Size of the stack memory region
|
||||
*/
|
||||
#if defined(CONFIG_USERSPACE) && \
|
||||
defined(CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT)
|
||||
#define Z_ARCH_THREAD_STACK_DEFINE(sym, size) \
|
||||
|
@ -151,16 +131,6 @@ extern "C" {
|
|||
sym[size+MPU_GUARD_ALIGN_AND_SIZE]
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Calculate size of stacks to be allocated in a stack array
|
||||
*
|
||||
* This macro calculates the size to be allocated for the stacks
|
||||
* inside a stack array. It accepts the indicated "size" as a parameter
|
||||
* and if required, pads some extra bytes (e.g. for MPU scenarios). Refer
|
||||
* K_THREAD_STACK_ARRAY_DEFINE definition to see how this is used.
|
||||
*
|
||||
* @param size Size of the stack memory region
|
||||
*/
|
||||
#if defined(CONFIG_USERSPACE) && \
|
||||
defined(CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT)
|
||||
#define Z_ARCH_THREAD_STACK_LEN(size) (POW2_CEIL(size))
|
||||
|
@ -168,19 +138,6 @@ extern "C" {
|
|||
#define Z_ARCH_THREAD_STACK_LEN(size) ((size)+MPU_GUARD_ALIGN_AND_SIZE)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Declare a top level array of thread stack memory regions
|
||||
*
|
||||
* Create an array of equally sized stacks. See K_THREAD_STACK_DEFINE
|
||||
* definition for additional details and constraints.
|
||||
*
|
||||
* This is the generic, historical definition. Align to STACK_ALIGN_SIZE and
|
||||
* put in * 'noinit' section so that it isn't zeroed at boot
|
||||
*
|
||||
* @param sym Thread stack symbol name
|
||||
* @param nmemb Number of stacks to declare
|
||||
* @param size Size of the stack memory region
|
||||
*/
|
||||
#if defined(CONFIG_USERSPACE) && \
|
||||
defined(CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT)
|
||||
#define Z_ARCH_THREAD_STACK_ARRAY_DEFINE(sym, nmemb, size) \
|
||||
|
@ -194,18 +151,6 @@ extern "C" {
|
|||
sym[nmemb][Z_ARCH_THREAD_STACK_LEN(size)]
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Declare an embedded stack memory region
|
||||
*
|
||||
* Used for stacks embedded within other data structures. Use is highly
|
||||
* discouraged but in some cases necessary. For memory protection scenarios,
|
||||
* it is very important that any RAM preceding this member not be writable
|
||||
* by threads else a stack overflow will lead to silent corruption. In other
|
||||
* words, the containing data structure should live in RAM owned by the kernel.
|
||||
*
|
||||
* @param sym Thread stack symbol name
|
||||
* @param size Size of the stack memory region
|
||||
*/
|
||||
#if defined(CONFIG_USERSPACE) && \
|
||||
defined(CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT)
|
||||
#define Z_ARCH_THREAD_STACK_MEMBER(sym, size) \
|
||||
|
@ -217,42 +162,8 @@ extern "C" {
|
|||
sym[size+MPU_GUARD_ALIGN_AND_SIZE]
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Return the size in bytes of a stack memory region
|
||||
*
|
||||
* Convenience macro for passing the desired stack size to k_thread_create()
|
||||
* since the underlying implementation may actually create something larger
|
||||
* (for instance a guard area).
|
||||
*
|
||||
* The value returned here is guaranteed to match the size of the stack that
|
||||
* is available for the thread, i.e. excluding the size of areas that are not
|
||||
* to be used (for instance the guard area).
|
||||
*
|
||||
* The value returned here is NOT guaranteed to match the 'size' parameter
|
||||
* passed to K_THREAD_STACK_DEFINE and related macros.
|
||||
*
|
||||
* In the case of CONFIG_USERSPACE=y and
|
||||
* CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT=y, the returned size will be
|
||||
* smaller than the requested 'size'.
|
||||
*
|
||||
* In all other configurations, the size will be correct.
|
||||
*
|
||||
* @param sym Stack memory symbol
|
||||
* @return Actual size of the stack available for the thread
|
||||
*/
|
||||
#define Z_ARCH_THREAD_STACK_SIZEOF(sym) (sizeof(sym) - MPU_GUARD_ALIGN_AND_SIZE)
|
||||
|
||||
/**
|
||||
* @brief Get a pointer to the physical stack buffer
|
||||
*
|
||||
* Convenience macro to get at the real underlying stack buffer used by
|
||||
* the CPU. Guaranteed to be a character pointer of size K_THREAD_STACK_SIZEOF.
|
||||
* This is really only intended for diagnostic tools which want to examine
|
||||
* stack memory contents.
|
||||
*
|
||||
* @param sym Declared stack symbol name
|
||||
* @return The buffer itself, a char *
|
||||
*/
|
||||
#define Z_ARCH_THREAD_STACK_BUFFER(sym) \
|
||||
((char *)(sym) + MPU_GUARD_ALIGN_AND_SIZE)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue