mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
Update some comments
This commit is contained in:
@@ -112,10 +112,11 @@ static inline void irq_waitlock(int cpu)
|
|||||||
|
|
||||||
while (up_testset(&g_cpu_irqlock) == SP_LOCKED)
|
while (up_testset(&g_cpu_irqlock) == SP_LOCKED)
|
||||||
{
|
{
|
||||||
/* The deadlock condition would occur if CPUn:
|
/* A deadlock condition would occur if CPUn:
|
||||||
*
|
*
|
||||||
* 1. Holds the g_cpu_irqlock, and
|
* 1. Holds the g_cpu_irqlock, and
|
||||||
* 2. Is trying to interrupt CPUm
|
* 2. Is trying to interrupt CPUm, but
|
||||||
|
* 3. CPUm is spinning trying acquaire the g_cpu_irqlock.
|
||||||
*
|
*
|
||||||
* The protocol for CPUn to pause CPUm is as follows
|
* The protocol for CPUn to pause CPUm is as follows
|
||||||
*
|
*
|
||||||
@@ -128,15 +129,15 @@ static inline void irq_waitlock(int cpu)
|
|||||||
* interrupt handler.
|
* interrupt handler.
|
||||||
*
|
*
|
||||||
* The problem in the deadlock case is that CPUm cannot receive
|
* The problem in the deadlock case is that CPUm cannot receive
|
||||||
* the interrupt because it is locked up spinning. He we break
|
* the interrupt because it is locked up spinning. Here we break
|
||||||
* the deadlock here be handling the pause interrupt request
|
* the deadlock here be handling the pause interrupt request
|
||||||
* while waiting.
|
* while waiting.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (up_cpu_pausereq(cpu))
|
if (up_cpu_pausereq(cpu))
|
||||||
{
|
{
|
||||||
/* Yes.. some CPU is requesting to pause us! Handle the
|
/* Yes.. some other CPU is requesting to pause this CPU! Handle
|
||||||
* pause interrupt now.
|
* the pause interrupt now.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DEBUGVERIFY(up_cpu_paused(cpu));
|
DEBUGVERIFY(up_cpu_paused(cpu));
|
||||||
|
|||||||
Reference in New Issue
Block a user