Macros for writing interrupt handler functions