Reviewed-by: rehn, dholmes
Use semaphore-based blocking and notifying, instead of Mutex. Reviewed-by: tschatzl, sangheki