First of all let me state that im coding on a windows XP platform. I have a function that called logs that writes the state of my program to c:/log.txt, however I want this function to be mutally exclusive so it can only be wrote by one thread at a time. Do you recommend using semaphores or protecting the log function? Also what headers would I hafe to include to achieve this (remembering its for windows)?
Thanks a lot