Skip to content
Snippets Groups Projects
Commit 0c3207e8 authored by Gregory Nutt's avatar Gregory Nutt
Browse files

Fix backward logic in an assertion.

parent 16f0b8fa
No related branches found
No related tags found
No related merge requests found
......@@ -166,7 +166,7 @@ irqstate_t enter_critical_section(void)
* the spinlock.
*/
DEBUGASSERT((g_cpu_irqset & (1 << this_cpu())) != 0); /* Really requires g_cpu_irqsetlock */
DEBUGASSERT((g_cpu_irqset & (1 << this_cpu())) == 0); /* Really requires g_cpu_irqsetlock */
spin_lock(&g_cpu_irqset);
/* The set the lock count to 1.
......@@ -261,7 +261,7 @@ void leave_critical_section(irqstate_t flags)
else
{
FAR struct tcb_s *rtcb = this_task();
DEBUGASSERT(rtcb != 0 && rtcb->irqcount > 0);
DEBUGASSERT(rtcb != NULL && rtcb->irqcount > 0);
/* Normal tasking context. We need to coordinate with other
* tasks.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment