filesystem accessed by multiple threads

Hi All,

I'm developing an application with keil RTX and STM32F4.
One thread collect events on a log file. I manage the files with fopen, fwrite, fdelete, ....

Another thread manages the network interface. With the FTP server I can download files to my PC.

I would like that one thread at a time accesses to the log file, in order to avoid read or write errors, due to simultaneous access.

Could anyone suggest me how to do?

Many thanks in advance.

Davide

More questions in this forum