malloc thread safe

Hi,master:

Platform: cortex m0


I want to use malloc safely in a multitasking system. I have some questions about the official instructions (as shown in the figure below).

my question is:
_mutex_* functions refer to weakly declared functions in the library:
_mutex_release/_mutex_acquire/_mutex_initialize
These three, if they are:
I am in the project: __attribute__((used)) void _mutex_release (void* mutex)
{//do something}
__attribute__((used)) void _mutex_acquire(void* mutex)
{//do something}
But these functions are not called when the program is running. I want to know how to ensure thread safety?

Thanks.

More questions in this forum