From 5a20291c552599abd934ae85d6a206ce01861ce2 Mon Sep 17 00:00:00 2001 From: sherecho <2443397610@qq.com> Date: Mon, 14 Oct 2024 09:15:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=85=BC=E5=AE=B9=E6=80=A7=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arch/arm/pico-RP2040/gcc/picoPortMacro.h | 2 +- arch/arm/pico-RP2040/gcc/port_s.S | 2 +- core/tos_sys.c | 12 ++---------- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/arch/arm/pico-RP2040/gcc/picoPortMacro.h b/arch/arm/pico-RP2040/gcc/picoPortMacro.h index 9448dc8..6310747 100644 --- a/arch/arm/pico-RP2040/gcc/picoPortMacro.h +++ b/arch/arm/pico-RP2040/gcc/picoPortMacro.h @@ -22,7 +22,7 @@ #define INVALID_PRIMARY_CORE_NUM 0xffu #define portMIN_INTERRUPT_PRIORITY ( 255UL ) typedef uint32_t BaseType_t; - #if(USE_SMP==1u) + #if(USE_SMP >0u) /* Multi-core */ #define portMAX_CORE_COUNT 2 //获取core ID diff --git a/arch/arm/pico-RP2040/gcc/port_s.S b/arch/arm/pico-RP2040/gcc/port_s.S index 3203222..5b6d330 100644 --- a/arch/arm/pico-RP2040/gcc/port_s.S +++ b/arch/arm/pico-RP2040/gcc/port_s.S @@ -1,4 +1,4 @@ - @.equ SMP, 1 + .equ SMP, 1 .global port_int_disable .global port_int_enable diff --git a/core/tos_sys.c b/core/tos_sys.c index 0d2ac40..bef20b0 100644 --- a/core/tos_sys.c +++ b/core/tos_sys.c @@ -410,14 +410,6 @@ __KNL__ int knl_is_self(k_task_t *task) { return task == k_curr_task; } - -__STATIC__ void knl_idle1_entry(void *arg) -{ - arg = arg; // make compiler happy - while (K_TRUE) { - knl_sched(); - } -} __STATIC__ void knl_idle_entry(void *arg) { arg = arg; // make compiler happy @@ -428,11 +420,11 @@ __STATIC__ void knl_idle_entry(void *arg) #if TOS_CFG_PWR_MGR_EN > 0u pm_power_manager(); #endif - #if(USE_SMP==1u) + if(k_rdyq.highest_prio