added enclosing __enter_isr() and __exit_isr() to ISR