Sawtooth oscillations and fast-ion ejection in tokamaks