This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Implementing mutex locking of the C-libary

Hello all,

I want to use dynamic memory allocation functions of the Realview C-Libary(MDK-ARM V3.11) together with the RTX-Kernel in a multithreaded application.

To make some functions threadsafe I will have to implement the mutex functions of the libary. Because the mutexes of the RTX-Kernel are larger than a 32-Bit Word, I have to define those as global variables and use the 32-Bit Word as pointer.

Now I needed to now how many mutexes are used by the C-Libary to reserve enough memory at compiletime. I couldn't find any information about that in the documentation of the libary. So I made some tests and recognized that the mutex_initialize function was called 5 times at the startup. So I assume that only 5 mutexes are necessary.

Is the number of neccessary mutexes constant or does it depent on the functions used?

I would be greatful for some hints.

Thanks in advance

Rainer

0