Patent ID: 8424016

Claim:
A method comprising: interrupting a thread with an interrupt routine during a first critical region; and setting a first flag to mark the thread as having been interrupted during the first critical region; setting the thread to restart at a beginning of the first critical region in response to an indication that the thread is working in a critical region, wherein the thread is to avoid disabling all interrupts before it enters the first critical region and avoid re-enabling the interrupts after exiting the first critical region, wherein setting the thread to start at the beginning of the first critical region comprises: determining if the thread has been previously interrupted during the first critical region based on the first flag and incrementing a count of a number of times the thread in the first critical region has been interrupted in response to the thread in the first critical region having been previously interrupted, saving program stack conditions of the interrupted thread in response to the thread not having been interrupted during the first critical region more than a permitted number of times, performing critical region interrupt recovery work in response to an indication that the first critical region was previously interrupted, and attempting to complete first critical region work.