mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
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:
@@ -181,7 +181,7 @@ irqstate_t enter_critical_section(void)
|
|||||||
* no longer blocked by the critical section).
|
* no longer blocked by the critical section).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
spin_lock(&g_cpu_irqlock);
|
spin_lock_wo_note(&g_cpu_irqlock);
|
||||||
cpu_irqlock_set(cpu);
|
cpu_irqlock_set(cpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,7 +232,7 @@ irqstate_t enter_critical_section(void)
|
|||||||
|
|
||||||
DEBUGASSERT((g_cpu_irqset & (1 << cpu)) == 0);
|
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.
|
/* Then set the lock count to 1.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user