As a rule, use std::atomicfor POD types, where the main specialization will be able to use something clever, like locking a bus on a CPU (which will not give you more extra costs than a pipeline dump) or even a spin lock. In some systems, it intmay already be atomic, therefore it std::atomic<int>will effectively specialize in int.
std::mutex -POD-, , , .
, .