The mass and temperature functions in a moving-barrier model