Added Mutex and WaitEvent class.