
Thanks.. Although, it seems as though I still don't totally understand the algorithm correctly myself... This was my first attempt at lock-free programming, so all of this is still quite new to me. I had thought that the use of CAS operations is all that was required. Do you have a suggestion for how I could add this missing piece, or perhaps some references for me to read?
well, most publication of algorithms assume a sequential memory model ... if the machine is using another memory model, memory barriers have to be placed ... on the x86/x86_64 architectures the cmpxchg instructions act as a memory barrier, but depending on the algorithm, some additional barriers need to be placed ... in my implementation of the ms-queue, i am using several barriers (possibly more than required by the algorithm), however it is working pretty well on multi-processor machines ... http://tim.klingt.org/git?p=nova.git;a=blob;f=libs/lockfree/fifo.hpp cheers, tim -- tim@klingt.org http://tim.klingt.org Just what the hell is the experimental tradition? Morton Feldman