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

Thread-safety protection of library functions

I have a project using an ARM9 and RL-ARM.

I'm wanting to use the malloc series of functions and have read the page "Thread-safety in the ARM C libraries" at:

http://www.keil.com/support/man/docs/armlib/armlib_chdfgjej.htm

Here it says that "some functions, such as malloc(), can be made thread-safe by implementing the _mutex_* functions".

So I looked at implementing the _mutex_* functions. There are details on:

http://www.keil.com/support/man/docs/armlib/armlib_chdfjddj.htm

But then I notice that my project, which already uses the fopen series of functions at startup (and currently only startup, when a single task is running), has these functions implemented in the file RTX_Lib.C (which is included by RTX_Config.C). Within the linker map file, I notice that _mutex_initialize is included but _mutex_acquire, _mutex_release and _mutex_free are not - Even when I include a test call to malloc in my project.

So the question is, would I be expected to do anything else to ensure that my calls to malloc() and the like are thread-safe?

0