diff --git a/include/rthw.h b/include/rthw.h index ca2187ebf33af8a73a1072ed04c6a85de5452b05..6f7bbd66508329f0db0d8b5896c23fe327ce32be 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;