Skip to content

Commit

Permalink
build test
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiJuWu committed Mar 17, 2024
1 parent c7f5756 commit ac454de
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
12 changes: 6 additions & 6 deletions include/nuttx/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -443,20 +443,20 @@ void spin_clrbit(FAR volatile cpu_set_t *set, unsigned int cpu,
*
****************************************************************************/

#if defined(CONFIG_SMP)
#if defined(CONFIG_SMP) || defined(CONFIG_SPINLOCK)
irqstate_t spin_lock_irqsave(FAR spinlock_t *lock);
#else
# define spin_lock_irqsave(l) ((void)(l), up_irq_save())
# define spin_lock_irqsave(l) up_irq_save()
#endif

/****************************************************************************
* Name: spin_lock_irqsave_wo_note
****************************************************************************/

#if defined(CONFIG_SMP)
#if defined(CONFIG_SMP) || defined(CONFIG_SPINLOCK)
irqstate_t spin_lock_irqsave_wo_note(FAR spinlock_t *lock);
#else
# define spin_lock_irqsave_wo_note(l) ((void)(l), up_irq_save())
# define spin_lock_irqsave_wo_note(l) up_irq_save()
#endif

/****************************************************************************
Expand Down Expand Up @@ -488,7 +488,7 @@ irqstate_t spin_lock_irqsave_wo_note(FAR spinlock_t *lock);
*
****************************************************************************/

#if defined(CONFIG_SMP)
#if defined(CONFIG_SMP) || defined(CONFIG_SPINLOCK)
void spin_unlock_irqrestore(FAR spinlock_t *lock, irqstate_t flags);
#else
# define spin_unlock_irqrestore(l, f) up_irq_restore(f)
Expand All @@ -498,7 +498,7 @@ void spin_unlock_irqrestore(FAR spinlock_t *lock, irqstate_t flags);
* Name: spin_unlock_irqrestore_wo_note
****************************************************************************/

#if defined(CONFIG_SMP)
#if defined(CONFIG_SMP) || defined(CONFIG_SPINLOCK)
void spin_unlock_irqrestore_wo_note(FAR spinlock_t *lock, irqstate_t flags);
#else
# define spin_unlock_irqrestore_wo_note(l, f) up_irq_restore(f)
Expand Down
12 changes: 0 additions & 12 deletions sched/semaphore/sem_rw.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,6 @@
#include <nuttx/irq.h>
#include <assert.h>

/****************************************************************************
* Pre-processor Definitions
****************************************************************************/

#undef spin_lock_irqsave
#undef spin_unlock_irqrestore

#if !defined(CONFIG_SPINLOCK) || !defined(CONFIG_SMP)
#define spin_lock_irqsave(lock) up_irq_save()
#define spin_unlock_irqrestore(lock, flags) up_irq_restore(flags)
#endif

/****************************************************************************
* Private Functions
****************************************************************************/
Expand Down
2 changes: 2 additions & 0 deletions sched/signal/sig_action.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
* Private Data
****************************************************************************/

#ifdef CONFIG_SPINLOCK
static spinlock_t g_sigaction_spin;
#endif

/****************************************************************************
* Private Functions
Expand Down

0 comments on commit ac454de

Please sign in to comment.