Hi,
We are using Colibri iMX7D for our product development. Our application is running on embedded Linux with GTK+3.
In our application, there will be a thread running always to get ADC data from M4 (RPMSG) and the data will not be processed until I get a interrupt from GPIO on A7 side. So, to implement this, I have a global boolean variable. In the interrupt thread (libsoc), I will be setting the boolean to be true. In the RPMSG thread, I will be processing the data if that variable is true. When another GPIO interrupt occurs, I will set the variable to be false in the interrupt thread.
After lot of googling, I found it is not good to use a shared variable inside multiple threads and found concepts like mutex and semaphores. It is a little bit confusing as both looks similiar and I am not sure about what to use for my application.Suggestions or directions to implement this are welcome.
Thanks and Regards,
Nishanth