1. A method for providing transitions between operating modes of a device, wherein the operating modes comprise a privileged mode and a non-privileged mode, and the method comprising: executing an application in the non-privileged mode; generating an interrupt to request the services of a privileged function; and transitioning to the privileged mode to execute the privileged function, wherein the privileged function is executed as part of the same thread of execution as the application.