This should be configured better, perhaps by providing a software interrupt and mask bit to go with every hardware interrupt.