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

C lib multi-threading problem

Hello, I am having problems getting a multi-threaded application running (Cortex-M4) with a custom OS and standard C library. I have re-implemented the three necessary mutex functions, however, only _mutex_acquire and _mutex_release seem to be called but NOT _mutex_initialize. Because of this, tasks are blocked when non-rentrent functions are called since the mutex was never initialized. My _mutex_initialize function is defined below:

int _mutex_initialize(OS_Sem* m)
{ if(m != NULL) OS_InitSem(m, 1, 1); return(1);
}

I have also used the attribute __attribute__((used)) in all _mutex function definitions, and I even tried calling the function manually to see if it is a linking issue.

Any help on this would be appreciated.

Tom

0