Quellcode durchsuchen

[fix] fix spin lock error when not define RT_USING_SMP

guozhanxin vor 3 Jahren
Ursprung
Commit
f1fe6ef705
1 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  1. 4 4
      include/rthw.h

+ 4 - 4
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;