Black holes and thermodynamics