- Edited
I'm working on an AuxiliaryTask which should handle my OLEDScreen rendering at a way slower rate, and less critical, than my audio thread.
At some point I need to synchronize a bit of data (a pointer and a small struct) between the two, and I'm not sure which mutex library I should use.
AFAIK I should make sure in the end the implementation uses a Xenomai's rt_mutex, to avoid priority inversion.
Am I right ?
Also which way should I use it (if I do), since I'm not using the bela IDE but I'm cross compiling using VSCode ? Do I need to directly find a way to include the right Xenomai header ?
Maybe std::mutex
already wraps a rt_mutex
in this context ?
I grepped through the Bela code and couldn't find any occurence of rt_mutex
EDIT : If rt_mutex
is the way to go it seems I found it in the alchemy
headers, both on local host and remote target :
- host : /usr/local/linaro/BelaSysroot/usr/xenomai/include/alchemy/mutex.h
- target : /opt/xenomai-3/include/alchemy/mutex.h