1.0.20.10: semaphore and condition variable fixes