Generalized hydrodynamics and extended irreversible thermodynamics