kernel: rename Z_KERNEL_STACK_LEN to K_KERNEL_STACK_LEN
Since there is a K_THREAD_STACK_LEN, its kernel counterpart should also be prefixed with K_ for consistency. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
42356b6d5c
commit
f05111dea0
|
@ -188,7 +188,7 @@ BUILD_ASSERT(CONFIG_PRIVILEGED_STACK_SIZE % Z_ARC_MPU_ALIGN == 0,
|
|||
* in another area of memory generated at build time by gen_kobject_list.py
|
||||
*
|
||||
* +------------+ <- thread.arch.priv_stack_start
|
||||
* | Priv Stack | } Z_KERNEL_STACK_LEN(CONFIG_PRIVILEGED_STACK_SIZE)
|
||||
* | Priv Stack | } K_KERNEL_STACK_LEN(CONFIG_PRIVILEGED_STACK_SIZE)
|
||||
* +------------+
|
||||
*
|
||||
* +------------+ <- thread.stack_obj = thread.stack_info.start
|
||||
|
|
|
@ -104,7 +104,7 @@ static inline char *z_stack_ptr_align(char *ptr)
|
|||
#define Z_KERNEL_STACK_OBJ_ALIGN ARCH_STACK_PTR_ALIGN
|
||||
#endif /* ARCH_KERNEL_STACK_OBJ_ALIGN */
|
||||
|
||||
#define Z_KERNEL_STACK_LEN(size) \
|
||||
#define K_KERNEL_STACK_LEN(size) \
|
||||
ROUND_UP(Z_KERNEL_STACK_SIZE_ADJUST(size), Z_KERNEL_STACK_OBJ_ALIGN)
|
||||
|
||||
/**
|
||||
|
@ -137,7 +137,7 @@ static inline char *z_stack_ptr_align(char *ptr)
|
|||
*/
|
||||
#define K_KERNEL_STACK_ARRAY_DECLARE(sym, nmemb, size) \
|
||||
extern struct z_thread_stack_element \
|
||||
sym[nmemb][Z_KERNEL_STACK_LEN(size)]
|
||||
sym[nmemb][K_KERNEL_STACK_LEN(size)]
|
||||
|
||||
/**
|
||||
* @brief Declare a reference to a pinned thread stack array
|
||||
|
@ -151,7 +151,7 @@ static inline char *z_stack_ptr_align(char *ptr)
|
|||
*/
|
||||
#define K_KERNEL_PINNED_STACK_ARRAY_DECLARE(sym, nmemb, size) \
|
||||
extern struct z_thread_stack_element \
|
||||
sym[nmemb][Z_KERNEL_STACK_LEN(size)]
|
||||
sym[nmemb][K_KERNEL_STACK_LEN(size)]
|
||||
|
||||
/**
|
||||
* @brief Define a toplevel kernel stack memory region in specified section
|
||||
|
@ -188,7 +188,7 @@ static inline char *z_stack_ptr_align(char *ptr)
|
|||
#define Z_KERNEL_STACK_ARRAY_DEFINE_IN(sym, nmemb, size, lsect) \
|
||||
struct z_thread_stack_element lsect \
|
||||
__aligned(Z_KERNEL_STACK_OBJ_ALIGN) \
|
||||
sym[nmemb][Z_KERNEL_STACK_LEN(size)]
|
||||
sym[nmemb][K_KERNEL_STACK_LEN(size)]
|
||||
|
||||
/**
|
||||
* @brief Define a toplevel kernel stack memory region
|
||||
|
@ -290,7 +290,7 @@ static inline char *Z_KERNEL_STACK_BUFFER(k_thread_stack_t *sym)
|
|||
#ifndef CONFIG_USERSPACE
|
||||
#define K_THREAD_STACK_RESERVED K_KERNEL_STACK_RESERVED
|
||||
#define K_THREAD_STACK_SIZEOF K_KERNEL_STACK_SIZEOF
|
||||
#define K_THREAD_STACK_LEN Z_KERNEL_STACK_LEN
|
||||
#define K_THREAD_STACK_LEN K_KERNEL_STACK_LEN
|
||||
#define K_THREAD_STACK_DEFINE K_KERNEL_STACK_DEFINE
|
||||
#define K_THREAD_STACK_ARRAY_DEFINE K_KERNEL_STACK_ARRAY_DEFINE
|
||||
#define K_THREAD_STACK_MEMBER K_KERNEL_STACK_MEMBER
|
||||
|
|
|
@ -794,7 +794,7 @@ def write_gperf_table(fp, syms, objs, little_endian, static_begin, static_end):
|
|||
# memory section.
|
||||
fp.write("static uint8_t Z_GENERIC_SECTION(.priv_stacks.noinit) "
|
||||
" __aligned(Z_KERNEL_STACK_OBJ_ALIGN)"
|
||||
" priv_stacks[%d][Z_KERNEL_STACK_LEN(CONFIG_PRIVILEGED_STACK_SIZE)];\n"
|
||||
" priv_stacks[%d][K_KERNEL_STACK_LEN(CONFIG_PRIVILEGED_STACK_SIZE)];\n"
|
||||
% stack_counter)
|
||||
|
||||
fp.write("static const struct z_stack_data stack_data[%d] = {\n"
|
||||
|
|
|
@ -271,7 +271,7 @@ void stack_buffer_scenarios(void)
|
|||
if (scenario_data.is_user) {
|
||||
adjusted = K_THREAD_STACK_LEN(scenario_data.declared_size);
|
||||
} else {
|
||||
adjusted = Z_KERNEL_STACK_LEN(scenario_data.declared_size);
|
||||
adjusted = K_KERNEL_STACK_LEN(scenario_data.declared_size);
|
||||
}
|
||||
adjusted -= reserved;
|
||||
|
||||
|
|
Loading…
Reference in a new issue