I apologize for the format, but I am writing on a PhysTech server for windows on a virtual machine with Linux, so I can only show screenshots.
Brief formulation of the problem: Write a program that transfers a file between two created threads, using only mutex's as a means of synchronization. You cannot use other means of synchronization and busy-loop!
Requirements: ・ The first thread only reads information from the input file ・ The second thread only writes information to the output file




freadandfwriteare standard C functions; use other names. - Fat-Zer