/* Search for an entry in the list */ while ((p_CB2 != NULL) && (prio <= p_CB2->prio)) { p_CB = (P_XCB)p_CB2; p_CB2 = p_CB2->p_lnk; <--- sometimes stuck here } /* Entry found, insert the task into the list */ p_task->p_lnk = p_CB2; p_CB->p_lnk = p_task; if (sem_mbx) { if (p_CB2 != NULL) { p_CB2->p_rlnk = p_task; } p_task->p_rlnk = (P_TCB)p_CB; <----stuck here } else { p_task->p_rlnk = NULL; } }
I have an issue where about after an 2 - 3 hours of running the CMSIS locks up in the rt_list.c very rarely but sometimes the processor hard faults and doing a stack trace points to the same rt_list.c function rt_put_prio.
Am I encountering a deadlock? The only other thing I can think of is one of my functions is changing the memory this function is using to manage the priority list?
This is on a cortex M0+ processor with 9 total threads I have configured all the threads with the same priority. I am using two mailbox's My round robin timer is 10 ticks, any other timer and the CMSIS only runs for 10 seconds and then locks up. Tried 5 ticks and 10 ticks.
Any help would be greatly appreciated.
View all questions in Keil forum