1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

test_utils/print_stack_usage: use thread.h API

This commit is contained in:
Kaspar Schleiser 2023-01-31 15:48:32 +01:00
parent fcf63cf5e3
commit 2a960f95ba

View File

@ -54,12 +54,13 @@ void print_stack_usage_metric(const char *name, void *stack, unsigned max_size)
void test_utils_print_stack_usage(void)
{
for (kernel_pid_t i = KERNEL_PID_FIRST; i <= KERNEL_PID_LAST; i++) {
thread_t *p = (thread_t *)sched_threads[i];
thread_t *p = thread_get(i);
if (p == NULL) {
continue;
}
print_stack_usage_metric(p->name, p->stack_start, p->stack_size);
print_stack_usage_metric(thread_get_name(p), thread_get_stackstart(
p), thread_get_stacksize(p));
}
}
#endif