sched: replace up_cpu_index with this_cpu

Make this_cpu is arch independent and up_cpu_index do that.
In AMP mode, up_cpu_index() may return the index of the physical core.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
This commit is contained in:
fangxinyong
2024-05-29 13:44:50 +08:00
committed by archer
parent fb58ac99fa
commit 7b05a550dc
91 changed files with 136 additions and 136 deletions
+2 -2
View File
@@ -211,7 +211,7 @@ static void dump_stack(FAR const char *tag, uintptr_t sp,
static void dump_stacks(FAR struct tcb_s *rtcb, uintptr_t sp)
{
#if CONFIG_ARCH_INTERRUPTSTACK > 0
uintptr_t intstack_base = up_get_intstackbase(up_cpu_index());
uintptr_t intstack_base = up_get_intstackbase(this_cpu());
size_t intstack_size = CONFIG_ARCH_INTERRUPTSTACK;
uintptr_t intstack_top = intstack_base + intstack_size;
uintptr_t intstack_sp = 0;
@@ -260,7 +260,7 @@ static void dump_stacks(FAR struct tcb_s *rtcb, uintptr_t sp)
intstack_base,
intstack_size,
#ifdef CONFIG_STACK_COLORATION
up_check_intstack(up_cpu_index())
up_check_intstack(this_cpu())
#else
0
#endif