Liblfds: portable lock-free data structures in C.
liblfds.org
liblfds.org
http://www.cs.rochester.edu/u/scott/papers/1996_PODC_queues....
It uses either compare_and_swap or load_linked/store_conditional. I thought compare_and_swap had a horrible (i.e. very slow) implementation on x86. Any idea whether load_linked/store_conditional is any better?
So yes, slow but otherwise it would be of no use.
load_linked and store_conditional are not much better. Depending on implementation they can spuriously fail because something poked the cache, there was memory traffic etc.
AFAIK, platforms provide one or the other; not both. So you have to use what you're given.