mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 17:33:08 +08:00
boards, include, sched: Remove CONFIG_SPINLOCK_IRQ
Summary: - This commit removes CONFIG_SPINLOCK_IRQ to avoid complexity Impact: - None Testing: - Tested with the following configs - spresense:wifi, spresense:smp - esp32-devkitc:smp (QEMU), sabre-6quad:smp (QEMU) - maix-bit:smp (QEMU), sim:smp - stm32f4discovery:wifi
This commit is contained in:
committed by
Xiang Xiao
parent
6547c3df55
commit
ad2e85433a
+6
-6
@@ -273,7 +273,7 @@ void leave_critical_section(irqstate_t flags);
|
||||
* Name: spin_lock_irqsave
|
||||
*
|
||||
* Description:
|
||||
* If SMP and SPINLOCK_IRQ are enabled:
|
||||
* If SMP is are enabled:
|
||||
* Disable local interrupts and take the global spinlock (g_irq_spin)
|
||||
* if the call counter (g_irq_spin_count[cpu]) equals to 0. Then the
|
||||
* counter on the CPU is increment to allow nested call.
|
||||
@@ -282,7 +282,7 @@ void leave_critical_section(irqstate_t flags);
|
||||
* or internal data structure) in SMP mode. But do not use this API
|
||||
* with kernel APIs which suspend a caller thread. (e.g. nxsem_wait)
|
||||
*
|
||||
* If SMP and SPINLOCK_IRQ are not enabled:
|
||||
* If SMP is not enabled:
|
||||
* This function is equivalent to enter_critical_section().
|
||||
*
|
||||
* Input Parameters:
|
||||
@@ -294,7 +294,7 @@ void leave_critical_section(irqstate_t flags);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_SMP) && defined(CONFIG_SPINLOCK_IRQ)
|
||||
#if defined(CONFIG_SMP)
|
||||
irqstate_t spin_lock_irqsave(void);
|
||||
#else
|
||||
# define spin_lock_irqsave() enter_critical_section()
|
||||
@@ -304,13 +304,13 @@ irqstate_t spin_lock_irqsave(void);
|
||||
* Name: spin_unlock_irqrestore
|
||||
*
|
||||
* Description:
|
||||
* If SMP and SPINLOCK_IRQ are enabled:
|
||||
* If SMP is enabled:
|
||||
* Decrement the call counter (g_irq_spin_count[cpu]) and if it
|
||||
* decrements to zero then release the spinlock (g_irq_spin) and
|
||||
* restore the interrupt state as it was prior to the previous call to
|
||||
* spin_lock_irqsave().
|
||||
*
|
||||
* If SMP and SPINLOCK_IRQ are not enabled:
|
||||
* If SMP is not enabled:
|
||||
* This function is equivalent to leave_critical_section().
|
||||
*
|
||||
* Input Parameters:
|
||||
@@ -322,7 +322,7 @@ irqstate_t spin_lock_irqsave(void);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_SMP) && defined(CONFIG_SPINLOCK_IRQ)
|
||||
#if defined(CONFIG_SMP)
|
||||
void spin_unlock_irqrestore(irqstate_t flags);
|
||||
#else
|
||||
# define spin_unlock_irqrestore(f) leave_critical_section(f)
|
||||
|
||||
Reference in New Issue
Block a user