[AMENDED topic] Detecting an Emergency Stop on Arduino

sherzaad:
Where the challenge lies is the second part to my query: Is possible to reset the loop to the start the moment the interrupt is triggered?

It seems to me that the pseudo code you posted will do exactly that - unless, of course, the code that is being executed at the time the interrupt is triggered takes a long time to complete before returning to loop(). Code should be designed to return to loop() very quickly even if there is no interrupt being used.

Have a look at the code in Several things at a time. Note how each function runs very briefly and returns to loop() so the next one can be called. And there may be dozens of calls to a function before it is actually time for it to do anything.

If these ideas do not solve the problem then you need to explain what is happening that needs to stop even more quickly and post the code that you are using.

...R