
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? Thanks, -Mike On Apr 17, 2008, at 3:52 PM, Tim Blechmann wrote:
On Thu, 17 Apr 2008 15:23:09 -0700, Michael Dickey wrote:
I wrote a C++ lock free queue implementation recently based on the Michael & Scott algorithm, that uses APR's atomics. It's available at:
http://svn.atomiclabs.com/pion-common/trunk/common/include/pion/ PionLockFreeQueue.hpp
interesting implementation ... using pre-allocated fixed memory seems to be an interesting way around the cas2 requirement and the memory reclamation problem ...
however if i understand the algorithm correctly, you're missing some memory barriers ... this might be the problem that you were writing about, having multiple producer/consumer threads ...
cheers, tim
-- tim@klingt.org http://tim.klingt.org
Cheat your landlord if you can and must, but do not try to shortchange the Muse. It cannot be done. You can't fake quality any more than you can fake a good meal. William S. Burroughs
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost