Patent ID: 7353346

Claim:
A method comprising: to update contents of a section of memory, copying a global flip-counter bit to a local flip-counter bit, the global flip-counter bit specifying which of a first set of per-processor counters and a second set of per-processor counters is a current set of per-processor counters and which is a last set of per-processor counters, the global flip-counter bit also specifying which of a first set of per-processor need-memory-barrier bits and a second set of per-processor need-memory-barrier bits is a current set of per-processor need-memory-barrier bits and which is a last set of per-processor need-memory-barrier bits; where attempting to acquire a flip-counter-bit lock on the global-flip-counter bit is successful, where the global flip-counter bit has not changed while acquiring the flip-counter-bit lock, where all of the last set of per-processor counters are zero, such that none of a plurality of threads being executed by a plurality of processors corresponding to the last set of per-processor counters are currently executing a critical read operation on the section of memory, where all of the last set of per-processor need-memory-barrier bits are zero, such that none of the processors needs to execute a memory barrier, setting each of the current set of per-processor need-memory-barrier bits to one, using the local flip-counter bit; inverting the global flip-counter bit; and, releasing the flip-counter-bit lock.