Add mutexes to data structures.