Implement boost and stl mutexes and atomics.