kernel: rename Z_THREAD_STACK_BUFFER to K_THREAD_STACK_BUFFER
Simple rename to align the kernel naming scheme. This is being used throughout the tree, especially in the architecture code. As this is not a private API internal to kernel, prefix it appropriately with K_. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
b69d2486fe
commit
efe30749de
|
@ -286,7 +286,7 @@ FUNC_NORETURN void z_arc_switch_to_main_no_multithreading(k_thread_entry_t main_
|
|||
_kernel.cpus[0].irq_stack = (K_KERNEL_STACK_BUFFER(z_interrupt_stacks[0]) +
|
||||
K_KERNEL_STACK_SIZEOF(z_interrupt_stacks[0]));
|
||||
|
||||
void *main_stack = (Z_THREAD_STACK_BUFFER(z_main_stack) +
|
||||
void *main_stack = (K_THREAD_STACK_BUFFER(z_main_stack) +
|
||||
K_THREAD_STACK_SIZEOF(z_main_stack));
|
||||
|
||||
arch_irq_unlock(_ARC_V2_INIT_IRQ_LOCK_KEY);
|
||||
|
|
|
@ -361,7 +361,7 @@ uint32_t z_check_thread_stack_fail(const uint32_t fault_addr, const uint32_t psp
|
|||
guard_len,
|
||||
fault_addr, psp)) {
|
||||
/* Thread stack corruption */
|
||||
return (uint32_t)Z_THREAD_STACK_BUFFER(z_main_stack);
|
||||
return (uint32_t)K_THREAD_STACK_BUFFER(z_main_stack);
|
||||
}
|
||||
#endif
|
||||
#endif /* CONFIG_USERSPACE */
|
||||
|
|
|
@ -439,7 +439,7 @@ uint32_t z_check_thread_stack_fail(const uint32_t fault_addr, const uint32_t psp
|
|||
guard_len,
|
||||
fault_addr, psp)) {
|
||||
/* Thread stack corruption */
|
||||
return (uint32_t)Z_THREAD_STACK_BUFFER(z_main_stack);
|
||||
return (uint32_t)K_THREAD_STACK_BUFFER(z_main_stack);
|
||||
}
|
||||
#endif
|
||||
#endif /* CONFIG_USERSPACE */
|
||||
|
@ -595,11 +595,11 @@ FUNC_NORETURN void z_arm_switch_to_main_no_multithreading(
|
|||
z_arm_prepare_switch_to_main();
|
||||
|
||||
/* Set PSP to the highest address of the main stack. */
|
||||
char *psp = Z_THREAD_STACK_BUFFER(z_main_stack) +
|
||||
char *psp = K_THREAD_STACK_BUFFER(z_main_stack) +
|
||||
K_THREAD_STACK_SIZEOF(z_main_stack);
|
||||
|
||||
#if defined(CONFIG_BUILTIN_STACK_GUARD)
|
||||
char *psplim = (Z_THREAD_STACK_BUFFER(z_main_stack));
|
||||
char *psplim = (K_THREAD_STACK_BUFFER(z_main_stack));
|
||||
/* Clear PSPLIM before setting it to guard the main stack area. */
|
||||
__set_PSPLIM(0);
|
||||
#endif
|
||||
|
|
|
@ -209,7 +209,7 @@ FUNC_NORETURN void z_riscv_switch_to_main_no_multithreading(k_thread_entry_t mai
|
|||
_kernel.cpus[0].irq_stack = (K_KERNEL_STACK_BUFFER(z_interrupt_stacks[0]) +
|
||||
K_KERNEL_STACK_SIZEOF(z_interrupt_stacks[0]));
|
||||
|
||||
main_stack = (Z_THREAD_STACK_BUFFER(z_main_stack) +
|
||||
main_stack = (K_THREAD_STACK_BUFFER(z_main_stack) +
|
||||
K_THREAD_STACK_SIZEOF(z_main_stack));
|
||||
|
||||
__asm__ volatile (
|
||||
|
|
|
@ -294,7 +294,7 @@ static inline char *K_KERNEL_STACK_BUFFER(k_thread_stack_t *sym)
|
|||
#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
|
||||
#define Z_THREAD_STACK_BUFFER K_KERNEL_STACK_BUFFER
|
||||
#define K_THREAD_STACK_BUFFER K_KERNEL_STACK_BUFFER
|
||||
#define K_THREAD_STACK_DECLARE K_KERNEL_STACK_DECLARE
|
||||
#define K_THREAD_STACK_ARRAY_DECLARE K_KERNEL_STACK_ARRAY_DECLARE
|
||||
#define K_THREAD_PINNED_STACK_DEFINE K_KERNEL_PINNED_STACK_DEFINE
|
||||
|
@ -650,7 +650,7 @@ static inline char *K_KERNEL_STACK_BUFFER(k_thread_stack_t *sym)
|
|||
* @param sym defined stack symbol name
|
||||
* @return The buffer itself, a char *
|
||||
*/
|
||||
static inline char *Z_THREAD_STACK_BUFFER(k_thread_stack_t *sym)
|
||||
static inline char *K_THREAD_STACK_BUFFER(k_thread_stack_t *sym)
|
||||
{
|
||||
return (char *)sym + K_THREAD_STACK_RESERVED;
|
||||
}
|
||||
|
|
|
@ -385,7 +385,7 @@ static char *setup_thread_stack(struct k_thread *new_thread,
|
|||
#ifdef CONFIG_USERSPACE
|
||||
if (z_stack_is_user_capable(stack)) {
|
||||
stack_obj_size = Z_THREAD_STACK_SIZE_ADJUST(stack_size);
|
||||
stack_buf_start = Z_THREAD_STACK_BUFFER(stack);
|
||||
stack_buf_start = K_THREAD_STACK_BUFFER(stack);
|
||||
stack_buf_size = stack_obj_size - K_THREAD_STACK_RESERVED;
|
||||
} else
|
||||
#endif /* CONFIG_USERSPACE */
|
||||
|
|
|
@ -59,8 +59,8 @@ void test_main(void)
|
|||
printk("ARM no-multithreading test\n");
|
||||
|
||||
uint32_t psp = (uint32_t)__get_PSP();
|
||||
uint32_t main_stack_base = (uint32_t)Z_THREAD_STACK_BUFFER(z_main_stack);
|
||||
uint32_t main_stack_top = (uint32_t)(Z_THREAD_STACK_BUFFER(z_main_stack) +
|
||||
uint32_t main_stack_base = (uint32_t)K_THREAD_STACK_BUFFER(z_main_stack);
|
||||
uint32_t main_stack_top = (uint32_t)(K_THREAD_STACK_BUFFER(z_main_stack) +
|
||||
K_THREAD_STACK_SIZEOF(z_main_stack));
|
||||
|
||||
__ASSERT(
|
||||
|
|
|
@ -114,7 +114,7 @@ void stack_buffer_scenarios(void)
|
|||
#ifdef CONFIG_USERSPACE
|
||||
if (scenario_data.is_user) {
|
||||
reserved = K_THREAD_STACK_RESERVED;
|
||||
stack_buf = Z_THREAD_STACK_BUFFER(stack_obj);
|
||||
stack_buf = K_THREAD_STACK_BUFFER(stack_obj);
|
||||
/* always use the original size here */
|
||||
alignment = Z_THREAD_STACK_OBJ_ALIGN(STEST_STACKSIZE);
|
||||
} else
|
||||
|
|
Loading…
Reference in a new issue