Just to wrap this up. std::mutex behaves as it should. Still most of the other OSs implemented it in a diverent way. And just as a short help. If somebody really wants to deadlock himself, it can be done with std::condition_variables.