No application programmer should even enable interrupts unless they understand the hardware ramifications. It will never be plug and play, let's not trick people by pretending it can be.
If you start building automatic accomodations into a function like that, it loses its flexibility (neutrality?) and risks side effects.