diff options
Diffstat (limited to 'os/kernel/src/chmtx.c')
-rw-r--r-- | os/kernel/src/chmtx.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/os/kernel/src/chmtx.c b/os/kernel/src/chmtx.c index 88b6f4ecd..93943bba0 100644 --- a/os/kernel/src/chmtx.c +++ b/os/kernel/src/chmtx.c @@ -136,7 +136,11 @@ void chMtxLockS(Mutex *mp) { break;
#endif
case THD_STATE_READY:
- /* Re-enqueues tp with its new priority on the ready list.*/
+#if CH_DBG_ENABLE_ASSERTS
+ /* Prevents an assertion in chSchReadyI().*/
+ tp->p_state = THD_STATE_CURRENT;
+#endif
+ /* Re-enqueues tp with its new priority on the ready list.*/
chSchReadyI(dequeue(tp));
}
break;
|