Subj : Re: A question about atomic_ptr To : comp.programming.threads From : Alexander Terekhov Date : Mon Apr 11 2005 02:00 pm Chris Thomasson wrote: > > DOH! > > > local_ptr = 0 > > ------------------------------- > > --local_ptr::refs > > if ( ! local_ptr::refs ) > > { > > if ( ! atomic_dec_acquire( &shared_ptr::refs ) ) > ^^^^^^^^^^^^^^^^ > > That's: > > if ( ! atomic_dec_release( &shared_ptr::refs ) ) Depending on value, you'll need either acquire or release here. regards, alexander. .