Cross platform mutexes and semaphores.