diff options
Diffstat (limited to 'os/rt/include/chsys.h')
-rw-r--r-- | os/rt/include/chsys.h | 3 |
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();
|