use spin_lock_wo_note replace spin_lock in csection

reason:
spin_lock_wo_note/spin_unlock_wo_note  should be called in matching pairs.
This commit fixes the regression from https://github.com/apache/nuttx/pull/13933

Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
hujun5
2024-11-19 12:59:22 +08:00
committed by Xiang Xiao
parent 00f831028f
commit 33226a9bb7
+2 -2
View File
@@ -181,7 +181,7 @@ irqstate_t enter_critical_section(void)
* no longer blocked by the critical section).
*/
spin_lock(&g_cpu_irqlock);
spin_lock_wo_note(&g_cpu_irqlock);
cpu_irqlock_set(cpu);
}
@@ -232,7 +232,7 @@ irqstate_t enter_critical_section(void)
DEBUGASSERT((g_cpu_irqset & (1 << cpu)) == 0);
spin_lock(&g_cpu_irqlock);
spin_lock_wo_note(&g_cpu_irqlock);
/* Then set the lock count to 1.
*