Implement interrupt handling.