inline functions used once in interrupt handler