Patent ID: 8095727

Claim:
A method for accessing cells of a ring buffer by two or more writers, comprising: storing a current writer cell position value in each of a done writer index as a done writer index value and a reserved writer index as a reserved writer index value; storing a current reader cell position value in a done reader index as a done reader index value; for each of the two or more writers: copying the current writer cell position value to an old writer variable as an old writer variable value; assigning a trial next writer cell position value to a new writer variable as a new writer variable value; accepting the trial next writer cell position value if the trial next writer cell position value is not equal to the done reader index value; as a single operation, first, accepting the trial next writer cell position value as a next writer cell position value if the reserved writer index value is equal to the old writer variable value, and second, replacing the reserved writer index value with the new writer variable value; after completing the single operation, writing data to a cell of the ring buffer indicated by the next writer cell position value; and, when the done writer index value is equal to the old writer variable value, replacing the done writer index value with the new writer variable value; whereby the two or more writers are prevented from simultaneously accessing the cell of the ring buffer.