semaphores sometomes have odd behaviour... just use the same mutexes and semaphores as everywhere else.