You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/10/04 15:41:10 UTC
[incubator-nuttx] branch master updated: sched: irq: Refactor irq_spinlock.c
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/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new d071d6869f sched: irq: Refactor irq_spinlock.c
d071d6869f is described below
commit d071d6869fadc5cabb047fe23219dfbb151322f9
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Tue Oct 4 18:01:34 2022 +0900
sched: irq: Refactor irq_spinlock.c
Summary:
- Call this_cpu() properly in spin_unlock_irqrestore()
Impact:
- None
Testing:
- Tested with spresense:wifi_smp
Signed-off-by: Masayuki Ishikawa <Ma...@jp.sony.com>
---
sched/irq/irq_spinlock.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sched/irq/irq_spinlock.c b/sched/irq/irq_spinlock.c
index 41638c8ea2..c828b57ca5 100644
--- a/sched/irq/irq_spinlock.c
+++ b/sched/irq/irq_spinlock.c
@@ -137,10 +137,9 @@ irqstate_t spin_lock_irqsave(spinlock_t *lock)
void spin_unlock_irqrestore(spinlock_t *lock, irqstate_t flags)
{
- int me = this_cpu();
-
if (NULL == lock)
{
+ int me = this_cpu();
DEBUGASSERT(0 < g_irq_spin_count[me]);
g_irq_spin_count[me]--;