AnsweredAssumed Answered

When to create shared mutexes, semaphores, etc.

Question asked by henry.m on Mar 10, 2014
Latest reply on Mar 12, 2014 by henry.m

Hi all,


I'm looking for the "recommended" way to initialise mutexes (or other things for task synchronisation for that matter) in MQX/MQX Lite.


Let's say I have a function which does some calculations and requires a mutex. This function may be used by some or all of my tasks. When is the best way to initialise the mutex?


Looking at some of the examples, a main task is normally started which creates the mutex and starts all other tasks afterwards. But I'm not sure whether this is actually the best way?


A "static" mutex would also work, but I don't see how that is possible with MQX/MQX-Lite?


Or should the mutex be initialised before the scheduler starts?