What is a swap-with-memory instruction? I am reading an article on algorithms for parallel computing and came across the following sentence.  What do they mean by a swap-with-memory instruction?


  Our algorithm provides reasonable latency in the absence of contention, requires only a constant amount of space per lock, and requires no hardware support other than a swap-with-memory instruction.


J. M. Mellor-Crummey and M. L. Scott, Algorithms for Scalable Synchronization on Shared-Memory Multiprocessors. ACM Transactions on Computer Systems, 9(1):21&ndash;65, 1991. (PDF)
I would assume the fetch_and_store instruction is meant. Look at the footnotes on page 2:


  1) Fetch-and-store exchanges a register with memory.


Keep in mind that this paper is over 20 years old, so the terminology can seem unfamiliar. However, often the semantic of the operations/instructions used in such papers are described in detail somewhere in the text.