Subj : Re: A question about atomic_ptr To : comp.programming.threads From : Joe Seigh Date : Wed Apr 13 2005 10:33 pm On Wed, 13 Apr 2005 15:20:43 -0400, Joe Seigh wrote: > On Wed, 13 Apr 2005 21:33:52 +0300, Peter Dimov wrote: >> I see it now, thank you; there is an ecount in atomic_ptr. But even though I >> understand what the code does, I'm still puzzled as to what this scheme buys >> you. >> > > Atomicity, i.e. strong thread safety. > I was going to say it is probably the only working atomic ptr out there. If you google for "Lock-free Reference Counting" you'll find a paper on on an implementation that requires an instruction no longer in existence. However google dragged up an article in the Dec 2004 CUJ titled "Atomic Reference Counting Pointers" by William K. Reinholtz which going by the code examples appears to be the same as the PPC version of atomic_ptr. I don't have access to the article itself so I don't know where he got the algorithm. Anyone know? -- Joe Seigh .