From f1fe6ef705902f4eb83a14f38c3234162848485e Mon Sep 17 00:00:00 2001 From: guozhanxin Date: Mon, 31 Oct 2022 12:55:25 +0800 Subject: [PATCH] [fix] fix spin lock error when not define RT_USING_SMP --- include/rthw.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/rthw.h b/include/rthw.h index ca2187ebf3..6f7bbd6650 100644 --- a/include/rthw.h +++ b/include/rthw.h @@ -194,11 +194,11 @@ void rt_hw_secondary_cpu_up(void); void rt_hw_secondary_cpu_idle_exec(void); #else -#define RT_DEFINE_SPINLOCK(x) -#define RT_DECLARE_SPINLOCK(x) rt_ubase_t x +#define RT_DEFINE_SPINLOCK(x) rt_ubase_t x +#define RT_DECLARE_SPINLOCK(x) -#define rt_hw_spin_lock(lock) *(lock) = rt_hw_interrupt_disable() -#define rt_hw_spin_unlock(lock) rt_hw_interrupt_enable(*(lock)) +#define rt_hw_spin_lock(lock) lock = rt_hw_interrupt_disable() +#define rt_hw_spin_unlock(lock) rt_hw_interrupt_enable(lock) typedef int rt_spinlock_t; -- Gitee