Let's consider multicore CPU x86. Now, we have a some computation that is being executing by 4 threads. To make a computation it is necessary to take two locks (e.g. mutexes). So, it is clear to avoid deadlock we can take them atomically. It means: all mutexes are taken or not.
In C++11 it can be done with std::lock
.
But, how it can be ensured that it is done atomically? I cannot imagine. I see how to do it on UP systems: just disable interrupts.