I’m asking myself which is the best way to access to a shared resource between task, for example:
I’ve a file containing raw data and two task that should access to this resources:
-) The first task is getting data from serial port one and should write data to the file.
-) The second task should read data from this file and send these to another serial port (based on external request).
The first solution is to use a Mutex on this file.
The other solution I’m thinking is to create a third task managing access to this file and receiving request (and data) from other other task and sending data to other task through Queue.
Which is the best solution?
Thanks for your help