aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2015-03-16 10:13:55 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2015-03-16 10:13:55 +0000
commitb9808723183a856312e21a2bc1becab3dadb9f35 (patch)
tree73088748772a93d3dc0208b7e5ced3c32d3812ba /os/rt
parent825c04410cd83c4d0a9fc41b06e9b4fc74ead9eb (diff)
downloadChibiOS-b9808723183a856312e21a2bc1becab3dadb9f35.tar.gz
ChibiOS-b9808723183a856312e21a2bc1becab3dadb9f35.tar.bz2
ChibiOS-b9808723183a856312e21a2bc1becab3dadb9f35.zip
Fixed bug #559.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7775 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt')
-rw-r--r--os/rt/include/chsys.h3
1 files changed, 2 insertions, 1 deletions
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();