Implement thread specific interrupt mask.