Here is a problem I want suggestions: I have some recovery after having detected some hardware failure. This recovery is absolutely the most important thing I have to do, and dont want any interruption. So I want disable the interrupts during the recovery period.
The problem is that the recovery involve setting some internal registers to a certains device, I can not access directly, instead I have to set a commands register, activate the command, the read or write is completed until the device ack'ed. Since I disable all interrupt, I poll the device to see if the device acq'd. At the same time, I want setup a timer for the polling to prevent the system hang. How would the timer would work if the interrupts are disabled?