Patent ID: 11972261
Assignee: ADVANCED MICRO DEVICES, INC.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 14:
15. A method comprising:
receiving, at a hardware compare and swap (CAS) module, a first request for an atomic operation on a data value that is shared among a plurality of users, the first request including the data value and a first operand value;
receiving, at the hardware CAS module, a second request for the atomic operation on the data value, the second request including the data value and the first operand value;
responsive to the first request, storing the data value in a first memory, performing the atomic operation to generate a first computed value, and storing the first computed value in a second memory storing updated data values, the atomic operation including a CAS operation that is native to a bus that is communicatively coupled to the hardware CAS module;
responsive to the second request, storing the data value in the first memory, performing the atomic operation, including the CAS operation, to generate a second computed value, and storing the second computed value in the second memory;
determining a first success status of the first request based on a first result of the CAS operation for the first request;
determining a second success status of the second request based on a second result of the CAS operation for the second request; and
responsive to determining a negative success status for one or more of the first request or the second request, updating the data value using the first computed value, and repetitively performing, at the hardware CAS module, the atomic operation, for one or more of the first request or the second request associated with the negative success status.