Forum Discussion
Altera_Forum
Honored Contributor
16 years agoG'day BWEIBERG,
I'll need to have a closer look at your changes. One change that I've made is to the following lines:
if ((tcb = (OS_TCB *)OSTCBPrioTbl) == (OS_TCB *)NULL)
continue; //unassigned priority
changed to:
tcb = (OS_TCB *)OSTCBPrioTbl;
if ( (tcb == (OS_TCB *)NULL) || (tcb == OS_TCB_RESERVED ) )
continue; /* unassigned priority */
Ucos flags a priority as reserved when using mutexes, so just checking for NULL is not sufficent. You'll get an access violation or misaligned address exception if you don't make this change. (or other weird behavior if you don't have the MPU / MMU on) I'm pretty sure that I filed a bug with Altera on this. But maybe not.