- how does it handle the ABA problem?
- how does it handle the safe memory reclamation problem?
The answers to these questions were not easy to find for this library.It appears that it solves the ABA problem by requiring DCAS (double-compare-and-swap). This rules out some platforms:
"Note that the Alpha, IA64, MIPS, PowerPC and SPARC architectures do not provide contigious double-word compare-and-swap and as such, liblfds cannot be ported to those architectures." --http://liblfds.org/documentation/mediawiki/index.php?title=r...
An earlier release had a note that the library could theoretically be ported to an architecture supporting LL/SC instead (load-linked/store-conditional), but this note seems to have been removed in later versions:
"Currently, liblfds has been ported only to platforms which provide a contigious double-word compare-and-swap (x86, x64 and ARM). It is entirely possible to port to a platform which instead provides load-link/conditional-store where non-load-linked loads can be performed inside the LL/SC pair (this is how ABA is solved using single word LL/SC) but this has not yet been done and it is not reasonable to ask a third party to undertake such a port until I've done it and documented it." --http://liblfds.org/documentation/mediawiki/index.php?title=r...
I could not readily find an answer to the question of how safe memory reclamation is handled. When elements are removed they are placed on a freelist, but there's no indication that the freelist is protected from prematurely deleting things at all. Perhaps the library is using DCAS somehow to ensure that deleted nodes are never dereferenced.