Adapting Lock-Free Concurrent Data Objects to Support a Generic Move Operation
In the paper Supporting Lock-Free Composition of Concurrent Data Objects we introduced a methodology to compose the insert and remove operations of lock-free data structures. This allowed for the creation of move operations that can atomically transfer data from one data structure to another. In this report we apply the methodology to four different types of data structures; a queue, a stack, a hash-table and a skip-list. We first show that the data structures are compatible with the methodology. We then go through the changes needed to adapt them. Code listings are provided that presents the algorithms before and after modification.