Skip to content

Commit 4e5c093

Browse files
Andrew Boienashif
authored andcommitted
kernel: demote K_THREAD_STACK_BUFFER() to private
This macro is slated for complete removal, as it's not possible on arches with an MPU stack guard to know the true buffer bounds without also knowing the runtime state of its associated thread. As removing this completely would be invasive to where we are in the 1.14 release, demote to a private kernel Z_ API instead. The current way that the macro is being used internally will not cause any undue harm, we just don't want any external code depending on it. The final work to remove this (and overhaul stack specification in general) will take place in 1.15 in the context of #14269 Fixes: #14766 Signed-off-by: Andrew Boie <[email protected]>
1 parent b379030 commit 4e5c093

File tree

29 files changed

+50
-51
lines changed

29 files changed

+50
-51
lines changed

arch/arc/core/thread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void z_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
6767
void *parameter1, void *parameter2, void *parameter3,
6868
int priority, unsigned int options)
6969
{
70-
char *pStackMem = K_THREAD_STACK_BUFFER(stack);
70+
char *pStackMem = Z_THREAD_STACK_BUFFER(stack);
7171
Z_ASSERT_VALID_PRIO(priority, pEntry);
7272

7373
char *stackEnd;

arch/arc/include/v2/irq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static ALWAYS_INLINE void z_irq_setup(void)
5555
z_arc_v2_aux_reg_write(_ARC_V2_AUX_IRQ_CTRL, aux_irq_ctrl_value);
5656

5757
_kernel.irq_stack =
58-
K_THREAD_STACK_BUFFER(_interrupt_stack) + CONFIG_ISR_STACK_SIZE;
58+
Z_THREAD_STACK_BUFFER(_interrupt_stack) + CONFIG_ISR_STACK_SIZE;
5959
}
6060

6161
#endif /* _ASMLANGUAGE */

arch/arm/core/thread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void z_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
5555
void *parameter1, void *parameter2, void *parameter3,
5656
int priority, unsigned int options)
5757
{
58-
char *pStackMem = K_THREAD_STACK_BUFFER(stack);
58+
char *pStackMem = Z_THREAD_STACK_BUFFER(stack);
5959
char *stackEnd;
6060
/* Offset between the top of stack and the high end of stack area. */
6161
u32_t top_of_stack_offset = 0U;

arch/arm/include/cortex_m/stack.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ static ALWAYS_INLINE void z_InterruptStackSetup(void)
4141
{
4242
#if defined(CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT) && \
4343
defined(CONFIG_USERSPACE)
44-
u32_t msp = (u32_t)(K_THREAD_STACK_BUFFER(_interrupt_stack) +
44+
u32_t msp = (u32_t)(Z_THREAD_STACK_BUFFER(_interrupt_stack) +
4545
CONFIG_ISR_STACK_SIZE - MPU_GUARD_ALIGN_AND_SIZE);
4646
#else
47-
u32_t msp = (u32_t)(K_THREAD_STACK_BUFFER(_interrupt_stack) +
47+
u32_t msp = (u32_t)(Z_THREAD_STACK_BUFFER(_interrupt_stack) +
4848
CONFIG_ISR_STACK_SIZE);
4949
#endif
5050

arch/arm/include/kernel_arch_func.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ z_arch_switch_to_main_thread(struct k_thread *main_thread,
6363
#if defined(CONFIG_MPU_REQUIRES_POWER_OF_TWO_ALIGNMENT) && \
6464
defined(CONFIG_USERSPACE)
6565
start_of_main_stack =
66-
K_THREAD_STACK_BUFFER(main_stack) + main_stack_size -
66+
Z_THREAD_STACK_BUFFER(main_stack) + main_stack_size -
6767
MPU_GUARD_ALIGN_AND_SIZE;
6868
#else
6969
start_of_main_stack =
70-
K_THREAD_STACK_BUFFER(main_stack) + main_stack_size;
70+
Z_THREAD_STACK_BUFFER(main_stack) + main_stack_size;
7171
#endif
7272
start_of_main_stack = (void *)STACK_ROUND_DOWN(start_of_main_stack);
7373

arch/nios2/core/thread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void z_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
3636
void *arg1, void *arg2, void *arg3,
3737
int priority, unsigned int options)
3838
{
39-
char *stack_memory = K_THREAD_STACK_BUFFER(stack);
39+
char *stack_memory = Z_THREAD_STACK_BUFFER(stack);
4040
Z_ASSERT_VALID_PRIO(priority, thread_func);
4141

4242
struct init_stack_frame *iframe;

arch/nios2/include/kernel_arch_func.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void k_cpu_atomic_idle(unsigned int key);
3232
static ALWAYS_INLINE void kernel_arch_init(void)
3333
{
3434
_kernel.irq_stack =
35-
K_THREAD_STACK_BUFFER(_interrupt_stack) + CONFIG_ISR_STACK_SIZE;
35+
Z_THREAD_STACK_BUFFER(_interrupt_stack) + CONFIG_ISR_STACK_SIZE;
3636
}
3737

3838
static ALWAYS_INLINE void

arch/posix/core/thread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void z_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
5151
int priority, unsigned int options)
5252
{
5353

54-
char *stack_memory = K_THREAD_STACK_BUFFER(stack);
54+
char *stack_memory = Z_THREAD_STACK_BUFFER(stack);
5555

5656
Z_ASSERT_VALID_PRIO(priority, thread_func);
5757

arch/riscv32/core/thread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ void z_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
2020
void *arg1, void *arg2, void *arg3,
2121
int priority, unsigned int options)
2222
{
23-
char *stack_memory = K_THREAD_STACK_BUFFER(stack);
23+
char *stack_memory = Z_THREAD_STACK_BUFFER(stack);
2424
Z_ASSERT_VALID_PRIO(priority, thread_func);
2525

2626
struct __esf *stack_init;

arch/riscv32/include/kernel_arch_func.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void k_cpu_atomic_idle(unsigned int key);
2828
static ALWAYS_INLINE void kernel_arch_init(void)
2929
{
3030
_kernel.irq_stack =
31-
K_THREAD_STACK_BUFFER(_interrupt_stack) + CONFIG_ISR_STACK_SIZE;
31+
Z_THREAD_STACK_BUFFER(_interrupt_stack) + CONFIG_ISR_STACK_SIZE;
3232
}
3333

3434
static ALWAYS_INLINE void

arch/x86/core/thread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void z_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
6868
struct _x86_initial_frame *initial_frame;
6969

7070
Z_ASSERT_VALID_PRIO(priority, entry);
71-
stack_buf = K_THREAD_STACK_BUFFER(stack);
71+
stack_buf = Z_THREAD_STACK_BUFFER(stack);
7272
z_new_thread_init(thread, stack_buf, stack_size, priority, options);
7373

7474
#if CONFIG_X86_USERSPACE

arch/x86/include/kernel_arch_func.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ extern K_THREAD_STACK_DEFINE(_interrupt_stack, CONFIG_ISR_STACK_SIZE);
3636
static inline void kernel_arch_init(void)
3737
{
3838
_kernel.nested = 0;
39-
_kernel.irq_stack = K_THREAD_STACK_BUFFER(_interrupt_stack) +
39+
_kernel.irq_stack = Z_THREAD_STACK_BUFFER(_interrupt_stack) +
4040
CONFIG_ISR_STACK_SIZE;
4141
#if CONFIG_X86_STACK_PROTECTION
4242
z_x86_mmu_set_flags(&z_x86_kernel_pdpt, _interrupt_stack, MMU_PAGE_SIZE,

arch/x86_64/core/x86_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void z_new_thread(struct k_thread *t, k_thread_stack_t *stack,
2929
void *args[] = { entry, p1, p2, p3 };
3030
int nargs = 4;
3131
int eflags = 0x200;
32-
char *base = K_THREAD_STACK_BUFFER(stack);
32+
char *base = Z_THREAD_STACK_BUFFER(stack);
3333
char *top = base + sz;
3434

3535
z_new_thread_init(t, base, sz, prio, opts);

arch/xtensa/core/thread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void z_new_thread(struct k_thread *thread, k_thread_stack_t *stack,
4848
void *p1, void *p2, void *p3,
4949
int priority, unsigned int options)
5050
{
51-
char *pStack = K_THREAD_STACK_BUFFER(stack);
51+
char *pStack = Z_THREAD_STACK_BUFFER(stack);
5252

5353
/* Align stack end to maximum alignment requirement. */
5454
char *stackEnd = (char *)ROUND_DOWN(pStack + stackSize, 16);

arch/xtensa/core/xtensa-asm2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void z_new_thread(struct k_thread *thread, k_thread_stack_t *stack, size_t sz,
6363
k_thread_entry_t entry, void *p1, void *p2, void *p3,
6464
int prio, unsigned int opts)
6565
{
66-
char *base = K_THREAD_STACK_BUFFER(stack);
66+
char *base = Z_THREAD_STACK_BUFFER(stack);
6767
char *top = base + sz;
6868

6969
/* Align downward. The API as specified requires a runtime check. */

arch/xtensa/include/kernel_arch_func.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static ALWAYS_INLINE void kernel_arch_init(void)
7070
cpu0->nested = 0;
7171

7272
#if CONFIG_XTENSA_ASM2
73-
cpu0->irq_stack = (K_THREAD_STACK_BUFFER(_interrupt_stack) +
73+
cpu0->irq_stack = (Z_THREAD_STACK_BUFFER(_interrupt_stack) +
7474
CONFIG_ISR_STACK_SIZE);
7575

7676
/* The asm2 scheme keeps the kernel pointer in MISC0 for easy
@@ -90,7 +90,7 @@ static ALWAYS_INLINE void kernel_arch_init(void)
9090
#endif
9191

9292
#ifdef CONFIG_INIT_STACKS
93-
memset(K_THREAD_STACK_BUFFER(_interrupt_stack), 0xAA,
93+
memset(Z_THREAD_STACK_BUFFER(_interrupt_stack), 0xAA,
9494
CONFIG_ISR_STACK_SIZE);
9595
#endif
9696
}

drivers/ieee802154/ieee802154_cc1200.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ static void cc1200_rx(struct device *dev)
502502
}
503503

504504
net_analyze_stack("CC1200 Rx Fiber stack",
505-
K_THREAD_STACK_BUFFER(cc1200->rx_stack),
505+
Z_THREAD_STACK_BUFFER(cc1200->rx_stack),
506506
K_THREAD_STACK_SIZEOF(cc1200->rx_stack));
507507
continue;
508508
flush:

drivers/ieee802154/ieee802154_cc2520.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ static void cc2520_rx(int arg)
671671
}
672672

673673
net_analyze_stack("CC2520 Rx Fiber stack",
674-
K_THREAD_STACK_BUFFER(cc2520->cc2520_rx_stack),
674+
Z_THREAD_STACK_BUFFER(cc2520->cc2520_rx_stack),
675675
K_THREAD_STACK_SIZEOF(cc2520->cc2520_rx_stack));
676676
continue;
677677
flush:

drivers/ieee802154/ieee802154_mcr20a.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ static inline void mcr20a_rx(struct mcr20a_context *mcr20a, u8_t len)
579579
}
580580

581581
net_analyze_stack("MCR20A Rx Fiber stack",
582-
K_THREAD_STACK_BUFFER(mcr20a->mcr20a_rx_stack),
582+
Z_THREAD_STACK_BUFFER(mcr20a->mcr20a_rx_stack),
583583
K_THREAD_STACK_SIZEOF(mcr20a->mcr20a_rx_stack));
584584
return;
585585
out:

drivers/ieee802154/ieee802154_nrf5.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ static void nrf5_rx_thread(void *arg1, void *arg2, void *arg3)
121121
if (CONFIG_IEEE802154_DRIVER_LOG_LEVEL >= LOG_LEVEL_DBG) {
122122
net_analyze_stack(
123123
"nRF5 rx stack",
124-
K_THREAD_STACK_BUFFER(nrf5_radio->rx_stack),
124+
Z_THREAD_STACK_BUFFER(nrf5_radio->rx_stack),
125125
K_THREAD_STACK_SIZEOF(nrf5_radio->rx_stack));
126126
}
127127

drivers/wifi/winc1500/wifi_winc1500.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static struct winc1500_data w1500_data;
163163
static void stack_stats(void)
164164
{
165165
net_analyze_stack("WINC1500 stack",
166-
K_THREAD_STACK_BUFFER(winc1500_stack),
166+
Z_THREAD_STACK_BUFFER(winc1500_stack),
167167
K_THREAD_STACK_SIZEOF(winc1500_stack));
168168
}
169169

include/kernel.h

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ static inline void k_obj_free(void *obj)
342342
/** @} */
343343

344344
/* Using typedef deliberately here, this is quite intended to be an opaque
345-
* type. K_THREAD_STACK_BUFFER() should be used to access the data within.
345+
* type.
346346
*
347347
* The purpose of this data type is to clearly distinguish between the
348348
* declared symbol for a stack (of type k_thread_stack_t) and the underlying
@@ -474,8 +474,8 @@ typedef struct _thread_base _thread_base_t;
474474
#if defined(CONFIG_THREAD_STACK_INFO)
475475
/* Contains the stack information of a thread */
476476
struct _thread_stack_info {
477-
/* Stack Start - Identical to K_THREAD_STACK_BUFFER() on the stack
478-
* object. Represents thread-writable stack area without any extras.
477+
/* Stack start - Represents the start address of the thread-writable
478+
* stack area.
479479
*/
480480
u32_t start;
481481

@@ -4585,7 +4585,7 @@ extern void z_timer_expiration_handler(struct _timeout *t);
45854585
#define K_THREAD_STACK_MEMBER(sym, size) Z_ARCH_THREAD_STACK_MEMBER(sym, size)
45864586
#define K_THREAD_STACK_SIZEOF(sym) Z_ARCH_THREAD_STACK_SIZEOF(sym)
45874587
#define K_THREAD_STACK_RESERVED Z_ARCH_THREAD_STACK_RESERVED
4588-
static inline char *K_THREAD_STACK_BUFFER(k_thread_stack_t *sym)
4588+
static inline char *Z_THREAD_STACK_BUFFER(k_thread_stack_t *sym)
45894589
{
45904590
return Z_ARCH_THREAD_STACK_BUFFER(sym);
45914591
}
@@ -4600,7 +4600,8 @@ static inline char *K_THREAD_STACK_BUFFER(k_thread_stack_t *sym)
46004600
*
46014601
* The declared symbol will always be a k_thread_stack_t which can be passed to
46024602
* k_thread_create(), but should otherwise not be manipulated. If the buffer
4603-
* inside needs to be examined, use K_THREAD_STACK_BUFFER().
4603+
* inside needs to be examined, examine thread->stack_info for the associated
4604+
* thread object to obtain the boundaries.
46044605
*
46054606
* It is legal to precede this definition with the 'static' keyword.
46064607
*
@@ -4697,16 +4698,14 @@ static inline char *K_THREAD_STACK_BUFFER(k_thread_stack_t *sym)
46974698
/**
46984699
* @brief Get a pointer to the physical stack buffer
46994700
*
4700-
* Convenience macro to get at the real underlying stack buffer used by
4701-
* the CPU. Guaranteed to be a character pointer of size K_THREAD_STACK_SIZEOF.
4702-
* This is really only intended for diagnostic tools which want to examine
4703-
* stack memory contents.
4701+
* This macro is deprecated. If a stack buffer needs to be examined, the
4702+
* bounds should be obtained from the associated thread's stack_info struct.
47044703
*
47054704
* @param sym Declared stack symbol name
47064705
* @return The buffer itself, a char *
47074706
* @req K-TSTACK-001
47084707
*/
4709-
static inline char *K_THREAD_STACK_BUFFER(k_thread_stack_t *sym)
4708+
static inline char *Z_THREAD_STACK_BUFFER(k_thread_stack_t *sym)
47104709
{
47114710
return (char *)sym;
47124711
}

include/misc/stack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static inline void stack_analyze(const char *name, const char *stack,
8585
#define STACK_ANALYZE(name, sym) \
8686
do { \
8787
stack_analyze(name, \
88-
K_THREAD_STACK_BUFFER(sym), \
88+
Z_THREAD_STACK_BUFFER(sym), \
8989
K_THREAD_STACK_SIZEOF(sym)); \
9090
} while (false)
9191

kernel/init.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -384,23 +384,23 @@ static void prepare_multithreading(struct k_thread *dummy_thread)
384384
init_idle_thread(_idle_thread1, _idle_stack1);
385385
_kernel.cpus[1].idle_thread = _idle_thread1;
386386
_kernel.cpus[1].id = 1;
387-
_kernel.cpus[1].irq_stack = K_THREAD_STACK_BUFFER(_interrupt_stack1)
387+
_kernel.cpus[1].irq_stack = Z_THREAD_STACK_BUFFER(_interrupt_stack1)
388388
+ CONFIG_ISR_STACK_SIZE;
389389
#endif
390390

391391
#if defined(CONFIG_SMP) && CONFIG_MP_NUM_CPUS > 2
392392
init_idle_thread(_idle_thread2, _idle_stack2);
393393
_kernel.cpus[2].idle_thread = _idle_thread2;
394394
_kernel.cpus[2].id = 2;
395-
_kernel.cpus[2].irq_stack = K_THREAD_STACK_BUFFER(_interrupt_stack2)
395+
_kernel.cpus[2].irq_stack = Z_THREAD_STACK_BUFFER(_interrupt_stack2)
396396
+ CONFIG_ISR_STACK_SIZE;
397397
#endif
398398

399399
#if defined(CONFIG_SMP) && CONFIG_MP_NUM_CPUS > 3
400400
init_idle_thread(_idle_thread3, _idle_stack3);
401401
_kernel.cpus[3].idle_thread = _idle_thread3;
402402
_kernel.cpus[3].id = 3;
403-
_kernel.cpus[3].irq_stack = K_THREAD_STACK_BUFFER(_interrupt_stack3)
403+
_kernel.cpus[3].irq_stack = Z_THREAD_STACK_BUFFER(_interrupt_stack3)
404404
+ CONFIG_ISR_STACK_SIZE;
405405
#endif
406406

kernel/thread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ void z_setup_new_thread(struct k_thread *new_thread,
369369
*/
370370
new_thread->userspace_local_data =
371371
(struct _thread_userspace_local_data *)
372-
(K_THREAD_STACK_BUFFER(stack) + stack_size);
372+
(Z_THREAD_STACK_BUFFER(stack) + stack_size);
373373
#endif
374374
#endif
375375

soc/xtensa/esp32/esp32-mp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,12 @@ void z_arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz,
205205

206206
sr.cpu = cpu_num;
207207
sr.fn = fn;
208-
sr.stack_top = K_THREAD_STACK_BUFFER(stack) + sz;
208+
sr.stack_top = Z_THREAD_STACK_BUFFER(stack) + sz;
209209
sr.arg = arg;
210210
sr.vecbase = vb;
211211
sr.alive = &alive_flag;
212212

213-
appcpu_top = K_THREAD_STACK_BUFFER(stack) + sz;
213+
appcpu_top = Z_THREAD_STACK_BUFFER(stack) + sz;
214214

215215
start_rec = &sr;
216216

subsys/net/ip/net_mgmt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ static inline void mgmt_run_callbacks(struct mgmt_event_entry *mgmt_event)
215215

216216
#ifdef CONFIG_NET_DEBUG_MGMT_EVENT_STACK
217217
net_analyze_stack("Net MGMT event stack",
218-
K_THREAD_STACK_BUFFER(mgmt_stack),
218+
Z_THREAD_STACK_BUFFER(mgmt_stack),
219219
K_THREAD_STACK_SIZEOF(mgmt_stack));
220220
#endif
221221
}

subsys/net/ip/net_shell.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2882,7 +2882,7 @@ static int cmd_net_stacks(const struct shell *shell, size_t argc,
28822882
ARG_UNUSED(argv);
28832883

28842884
for (info = __net_stack_start; info != __net_stack_end; info++) {
2885-
net_analyze_stack_get_values(K_THREAD_STACK_BUFFER(info->stack),
2885+
net_analyze_stack_get_values(Z_THREAD_STACK_BUFFER(info->stack),
28862886
info->size, &pcnt, &unused);
28872887

28882888
#if defined(CONFIG_INIT_STACKS)
@@ -2910,23 +2910,23 @@ static int cmd_net_stacks(const struct shell *shell, size_t argc,
29102910
}
29112911

29122912
#if defined(CONFIG_INIT_STACKS)
2913-
net_analyze_stack_get_values(K_THREAD_STACK_BUFFER(_main_stack),
2913+
net_analyze_stack_get_values(Z_THREAD_STACK_BUFFER(_main_stack),
29142914
K_THREAD_STACK_SIZEOF(_main_stack),
29152915
&pcnt, &unused);
29162916
PR("%s [%s] stack size %d/%d bytes unused %u usage %d/%d (%u %%)\n",
29172917
"main", "_main_stack", CONFIG_MAIN_STACK_SIZE,
29182918
CONFIG_MAIN_STACK_SIZE, unused,
29192919
CONFIG_MAIN_STACK_SIZE - unused, CONFIG_MAIN_STACK_SIZE, pcnt);
29202920

2921-
net_analyze_stack_get_values(K_THREAD_STACK_BUFFER(_interrupt_stack),
2921+
net_analyze_stack_get_values(Z_THREAD_STACK_BUFFER(_interrupt_stack),
29222922
K_THREAD_STACK_SIZEOF(_interrupt_stack),
29232923
&pcnt, &unused);
29242924
PR("%s [%s] stack size %d/%d bytes unused %u usage %d/%d (%u %%)\n",
29252925
"ISR", "_interrupt_stack", CONFIG_ISR_STACK_SIZE,
29262926
CONFIG_ISR_STACK_SIZE, unused,
29272927
CONFIG_ISR_STACK_SIZE - unused, CONFIG_ISR_STACK_SIZE, pcnt);
29282928

2929-
net_analyze_stack_get_values(K_THREAD_STACK_BUFFER(sys_work_q_stack),
2929+
net_analyze_stack_get_values(Z_THREAD_STACK_BUFFER(sys_work_q_stack),
29302930
K_THREAD_STACK_SIZEOF(sys_work_q_stack),
29312931
&pcnt, &unused);
29322932
PR("%s [%s] stack size %d/%d bytes unused %u usage %d/%d (%u %%)\n",

0 commit comments

Comments
 (0)