diff --git a/arch/arm/src/armv7-a/arm_cpupause.c b/arch/arm/src/armv7-a/arm_cpupause.c index c479039d42..927e8b9258 100644 --- a/arch/arm/src/armv7-a/arm_cpupause.c +++ b/arch/arm/src/armv7-a/arm_cpupause.c @@ -255,10 +255,12 @@ int up_cpu_pause(int cpu) * handler from returning until up_cpu_resume() is called; g_cpu_paused * is a handshake that will prefent this function from returning until * the CPU is actually paused. + * Note that we might spin before getting g_cpu_wait, this just means that + * the other CPU still hasn't finished responding to the previous resume + * request. */ - DEBUGASSERT(!spin_islocked(&g_cpu_wait[cpu]) && - !spin_islocked(&g_cpu_paused[cpu])); + DEBUGASSERT(!spin_islocked(&g_cpu_paused[cpu])); spin_lock(&g_cpu_wait[cpu]); spin_lock(&g_cpu_paused[cpu]); diff --git a/arch/arm/src/cxd56xx/cxd56_cpupause.c b/arch/arm/src/cxd56xx/cxd56_cpupause.c index 3bd3be9267..e56ab978af 100644 --- a/arch/arm/src/cxd56xx/cxd56_cpupause.c +++ b/arch/arm/src/cxd56xx/cxd56_cpupause.c @@ -350,10 +350,12 @@ int up_cpu_pause(int cpu) * handler from returning until up_cpu_resume() is called; g_cpu_paused * is a handshake that will prefent this function from returning until * the CPU is actually paused. + * Note that we might spin before getting g_cpu_wait, this just means that + * the other CPU still hasn't finished responding to the previous resume + * request. */ - DEBUGASSERT(!spin_islocked(&g_cpu_wait[cpu]) && - !spin_islocked(&g_cpu_paused[cpu])); + DEBUGASSERT(!spin_islocked(&g_cpu_paused[cpu])); spin_lock(&g_cpu_wait[cpu]); spin_lock(&g_cpu_paused[cpu]); diff --git a/arch/arm/src/lc823450/lc823450_cpupause.c b/arch/arm/src/lc823450/lc823450_cpupause.c index af8165cfac..9c41e828c9 100644 --- a/arch/arm/src/lc823450/lc823450_cpupause.c +++ b/arch/arm/src/lc823450/lc823450_cpupause.c @@ -266,10 +266,12 @@ int up_cpu_pause(int cpu) * handler from returning until up_cpu_resume() is called; g_cpu_paused * is a handshake that will prefent this function from returning until * the CPU is actually paused. + * Note that we might spin before getting g_cpu_wait, this just means that + * the other CPU still hasn't finished responding to the previous resume + * request. */ - DEBUGASSERT(!spin_islocked(&g_cpu_wait[cpu]) && - !spin_islocked(&g_cpu_paused[cpu])); + DEBUGASSERT(!spin_islocked(&g_cpu_paused[cpu])); spin_lock(&g_cpu_wait[cpu]); spin_lock(&g_cpu_paused[cpu]); diff --git a/arch/arm/src/rp2040/rp2040_cpupause.c b/arch/arm/src/rp2040/rp2040_cpupause.c index 639bb59251..00e69450c3 100644 --- a/arch/arm/src/rp2040/rp2040_cpupause.c +++ b/arch/arm/src/rp2040/rp2040_cpupause.c @@ -321,10 +321,12 @@ int up_cpu_pause(int cpu) * handler from returning until up_cpu_resume() is called; g_cpu_paused * is a handshake that will prefent this function from returning until * the CPU is actually paused. + * Note that we might spin before getting g_cpu_wait, this just means that + * the other CPU still hasn't finished responding to the previous resume + * request. */ - DEBUGASSERT(!spin_islocked(&g_cpu_wait[cpu]) && - !spin_islocked(&g_cpu_paused[cpu])); + DEBUGASSERT(!spin_islocked(&g_cpu_paused[cpu])); spin_lock(&g_cpu_wait[cpu]); spin_lock(&g_cpu_paused[cpu]); diff --git a/arch/arm/src/sam34/sam4cm_cpupause.c b/arch/arm/src/sam34/sam4cm_cpupause.c index 382a3e07b3..e7285c1ec2 100644 --- a/arch/arm/src/sam34/sam4cm_cpupause.c +++ b/arch/arm/src/sam34/sam4cm_cpupause.c @@ -256,10 +256,12 @@ int up_cpu_pause(int cpu) * interrupt handler from returning until up_cpu_resume() is called; * g_cpu_paused is a handshake that will prefent this function from * returning until the CPU is actually paused. + * Note that we might spin before getting g_cpu_wait, this just means that + * the other CPU still hasn't finished responding to the previous resume + * request. */ - DEBUGASSERT(!spin_islocked(&g_cpu_wait[cpu]) && - !spin_islocked(&g_cpu_paused[cpu])); + DEBUGASSERT(!spin_islocked(&g_cpu_paused[cpu])); spin_lock(&g_cpu_wait[cpu]); spin_lock(&g_cpu_paused[cpu]); diff --git a/arch/risc-v/src/k210/k210_cpupause.c b/arch/risc-v/src/k210/k210_cpupause.c index 3ac5042cc4..40270b761c 100644 --- a/arch/risc-v/src/k210/k210_cpupause.c +++ b/arch/risc-v/src/k210/k210_cpupause.c @@ -257,10 +257,12 @@ int up_cpu_pause(int cpu) * handler from returning until up_cpu_resume() is called; g_cpu_paused * is a handshake that will prefent this function from returning until * the CPU is actually paused. + * Note that we might spin before getting g_cpu_wait, this just means that + * the other CPU still hasn't finished responding to the previous resume + * request. */ - DEBUGASSERT(!spin_islocked(&g_cpu_wait[cpu]) && - !spin_islocked(&g_cpu_paused[cpu])); + DEBUGASSERT(!spin_islocked(&g_cpu_paused[cpu])); spin_lock(&g_cpu_wait[cpu]); spin_lock(&g_cpu_paused[cpu]);