Reversible processes in the thermodynamics of continuous media