Specific heat and thermal equilibrium