mutexes, threads and condition variables for windows and linux