This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 33226a9bb7 use spin_lock_wo_note replace spin_lock in csection
33226a9bb7 is described below

commit 33226a9bb75b05354c7c831db11f91c69853a58b
Author: hujun5 <[email protected]>
AuthorDate: Tue Nov 19 12:59:22 2024 +0800

    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 <[email protected]>
---
 sched/irq/irq_csection.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sched/irq/irq_csection.c b/sched/irq/irq_csection.c
index a0432f7fe9..b8277c758f 100644
--- a/sched/irq/irq_csection.c
+++ b/sched/irq/irq_csection.c
@@ -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.
            *

Reply via email to