multithread support with IAR libraries

simonthome2000 wrote on Tuesday, January 24, 2017:

Can anyone assist me with the FreeRTOS implimentation of enabling thread safe support with IAR and their functions below please?

typedef void *__iar_Rmtx;                /* Lock info object */
void __iar_system_Mtxinit(__iar_Rmtx *); /* Initialize a system
lock */
void __iar_system_Mtxdst(__iar_Rmtx *);  /*Destroy a system lock */
void __iar_system_Mtxlock(__iar_Rmtx *);  /* Lock a system lock */
void __iar_system_Mtxunlock(__iar_Rmtx *); /* Unlock a system lock */

richard_damon wrote on Tuesday, January 24, 2017:

I beleve that their is code in FreeRTOS to handle the newlib equivalent of these. bsically Mtxinit should create a mutex and store the handle into the the object passed to it. Mtxlock should take that mutex, and Mtxunlock should give it back, and Mtxdst should delete the mutex.