From b9808723183a856312e21a2bc1becab3dadb9f35 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Mon, 16 Mar 2015 10:13:55 +0000 Subject: [PATCH] Fixed bug #559. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7775 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/rt/include/chsys.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/os/rt/include/chsys.h b/os/rt/include/chsys.h index af725f627..7cc6aca5c 100644 --- a/os/rt/include/chsys.h +++ b/os/rt/include/chsys.h @@ -317,7 +317,8 @@ static inline void chSysUnlock(void) { in a critical section not followed by a chSchResceduleS(), this means that the current thread has a lower priority than the next thread in the ready list.*/ - chDbgAssert(ch.rlist.r_current->p_prio >= ch.rlist.r_queue.p_next->p_prio, + chDbgAssert((ch.rlist.r_queue.p_next == (thread_t *)&ch.rlist.r_queue) || + (ch.rlist.r_current->p_prio >= ch.rlist.r_queue.p_next->p_prio), "priority violation, missing reschedule"); port_unlock();