Patent ID: 11914972
Assignee: ARM LIMITED
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 20:
21. A method of data processing comprising:
storing components of a ring buffer comprising multiple slots to hold queued data items;
performing an enqueuing operation to add one or more processed data item indications to the ring buffer;
performing a dequeuing operation to remove one or more processed data item indications from the ring buffer,
wherein the enqueuing operation comprises performing an atomic compare-and-swap operation to store a first processed data item indication to an enqueuing-target slot in the ring buffer contingent on an in-order marker not being present in the enqueuing-target slot and, when the in-order marker is present in the enqueuing-target slot, determining a ready-to-dequeue condition to be true for the first processed data item indication, and
wherein the dequeuing operation compnses, when the ready-to-dequeue condition for a dequeuing-target slot is true:
writing a null data item to the dequeuing-target slot; and
when removing the one or more processed data item indications from the ring buffer in-order, the dequeuing operation further comprises:
a) dependent on whether a next contiguous slot has null content, determining a retirement condition and, when the retirement condition is true, performing a retirement process on the next contiguous slot comprising making the next contiguous slot available to a subsequent enqueuing operation;
b) repeating step a) through subsequent slots until for a reached slot the retirement condition is not true;
c) performing an atomic compare-and-swap operation to store the in-order marker to the reached slot contingent on content of the reached slot; and
d) when the atomic compare-and-swap operation to store the in-order marker to the reached slot fails, performing the retirement process on the reached slot and returning to step a), wherein the next contiguous slot is now treated as a slot which contiguously follows the reached slot.