Using Keil 5.15. Have about 20 mutexes created throughout our system. How do I check the state of each mutex? Can I see which task owns it?
Sorry, there is right now no viewer for the Mutex available.
A mutex state utility would be very helpful in debugging. How can I get access to the mutex control block?
Below is what the 4 uint32's for a mutex look like. Obviously subject to change at any time, but it has been stable since they first implemented mutex's.
typedef struct OS_MUCB { U8 cb_type; /* Control Block Type */ U16 level; /* Call nesting level */ struct OS_TCB *p_lnk; /* Chain of tasks waiting for mutex */ struct OS_TCB *owner; /* Mutex owner task */ struct OS_MUCB *p_mlnk; /* Chain of mutexes by owner task */ } *P_MUCB;