Wrote wrappers for mutex and condition variables