Patent ID: 7293143

Claim:
A method for providing a linearizable multi-compare, single-swap facility for concurrent software, the method comprising: snapshotting a plurality of application values corresponding to a respective plurality of targeted memory locations to determine whether any of the application values are changed between two successive reads at the targeted memory locations, wherein said snapshotting comprises reading each of the plurality the application values at least twice and comparing each application value across pairs of successive reads; updating a first application value corresponding to a first targeted memory location only if said snapshotting indicates that the plurality of application values remain unchanged between two successive reads at the targeted locations, wherein the first targeted memory location is distinct from the plurality of targeted locations; using a pair of single-location synchronizations to ensure that the first application value remains unchanged across said snapshotting; and displacing the first application value from the first targeted location prior to a linearization point of the snapshotting, wherein the displacing includes: reading the first application value; storing the read value in an auxiliary location associated with a tagged id; and storing, using a first of the single-location synchronizations, the tagged id in the first targeted location.