mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
Implement deferred IRQ locking. Adds partial support for Xtensa. More is needed.
This commit is contained in:
@@ -52,6 +52,7 @@
|
|||||||
|
|
||||||
#include "group/group.h"
|
#include "group/group.h"
|
||||||
#include "sched/sched.h"
|
#include "sched/sched.h"
|
||||||
|
#include "irq/irq.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
@@ -129,6 +130,17 @@ uint32_t *xtensa_irq_dispatch(int irq, uint32_t *regs)
|
|||||||
|
|
||||||
(void)group_addrenv(NULL);
|
(void)group_addrenv(NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_SMP
|
||||||
|
/* In the SMP configuration, critical section management uses a
|
||||||
|
* "voting" algorithm with current task on each CPU casting its
|
||||||
|
* "vote" by the state of the TCB irqcount flag. That irqcount
|
||||||
|
* for the current task on this CPU will be different is a
|
||||||
|
* context switch occurrred.
|
||||||
|
*/
|
||||||
|
|
||||||
|
irq_restore_lock();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user