But it's important to understand that that code is not re-entrant: that is, if my_fct is interrupted and the interrupt calls (possibly indirectly) my_fct again then the when the outer call to my_fct tries to return, bad things™ will happen.