Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sched/spin_lock: continue work to rename raw_spin* to spin_*_notrace #15862

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions include/nuttx/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ static inline_function void spin_lock(FAR volatile spinlock_t *lock)
#endif /* CONFIG_SPINLOCK */

/****************************************************************************
* Name: raw_spin_trylock
* Name: spin_trylock_notrace
*
* Description:
* Try once to lock the spinlock. Do not wait if the spinlock is already
Expand All @@ -271,7 +271,7 @@ static inline_function void spin_lock(FAR volatile spinlock_t *lock)

#ifdef CONFIG_SPINLOCK
static inline_function bool
raw_spin_trylock(FAR volatile spinlock_t *lock)
spin_trylock_notrace(FAR volatile spinlock_t *lock)
{
#ifdef CONFIG_TICKET_SPINLOCK
if (!atomic_cmpxchg(&lock->next, &lock->owner,
Expand Down Expand Up @@ -319,7 +319,7 @@ static inline_function bool spin_trylock(FAR volatile spinlock_t *lock)

/* Try lock without trace note */

locked = raw_spin_trylock(lock);
locked = spin_trylock_notrace(lock);
if (locked)
{
/* Notify that we have the spinlock */
Expand Down Expand Up @@ -500,7 +500,7 @@ irqstate_t spin_lock_irqsave(FAR volatile spinlock_t *lock)
#endif

/****************************************************************************
* Name: raw_spin_trylock_irqsave
* Name: spin_trylock_irqsave_notrace
*
* Description:
* Try once to lock the spinlock. Do not wait if the spinlock is already
Expand All @@ -523,14 +523,14 @@ irqstate_t spin_lock_irqsave(FAR volatile spinlock_t *lock)
****************************************************************************/

#ifdef CONFIG_SPINLOCK
# define raw_spin_trylock_irqsave(l, f) \
# define spin_trylock_irqsave_notrace(l, f) \
({ \
f = up_irq_save(); \
raw_spin_trylock(l) ? \
spin_trylock_notrace(l) ? \
true : ({ up_irq_restore(f); false; }); \
})
#else
# define raw_spin_trylock_irqsave(l, f) \
# define spin_trylock_irqsave_notrace(l, f) \
({ \
(void)(l); \
f = up_irq_save(); \
Expand Down
Loading