Hello,
I have a problem with an application using the KEIL RTX. The application consists of 30-40 Tasks which use several Mutex to control the access to shared ressources. The problem I have now is that one mutex that is used by almost all tasks seems to be not released anywhere in the code. Is there any way to see which task holds the Mutex? I know, i could also just check the code (which would be a bunch of work) but we had the case, that some function call to an external library would not return and therefore the Mutex would not be released. So this is not very helpful. Is there any way to see which tasks has the Mutex?
Kind Regards
What you can try is observe the part in the kernel RAM that maintains this information. This is indeed useful information to be conveyed by an IDE that is kernel aware, as well as the PC of each task...
Okay. But where do I find this information? Is it somehow stored inside the Mutex itself, which is defined as 'typedef U32 OS_MUT[4];'?
Honestly is sounds like you need to do a bunch of work to get a handle on the out of control code. Instrument it, and understand it, add your own wrappers to make sure it is taken/released consistently in a bracketed fashion. Your current tack seems to be to play whack-a-mole without a clear vision about how the architecture is supposed to function, and whether that can be simplified or optimized. If all the tasks take this one mutex, perhaps you need to refactor the tasks.