Disable interrupts in the critical section