Code: Select all
void chMtxUnlock(mutex_t *mp) {
thread_t *ctp = currp;
mutex_t *lmp;
chDbgCheck(mp != NULL);
chSysLock();
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");
chDbgAssert(ctp->p_mtxlist != NULL, "owned mutexes list empty");and it catches it here also. So for some reason my touchscreen thread is put in ready list but is not switched, or i dont know ;/.