X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=cds%2Furcu%2Fdetails%2Fgpb.h;h=5ad75d130d202372af6d13f5847a20a658259fa5;hb=8abb8f5e76bd8d723aff8078934ee30e59fa117a;hp=697925dac8cb9dc8a28211e7ef82e0c6e2c1861d;hpb=056d289619d45ccf1055c18d63cb3bad072a71a0;p=libcds.git diff --git a/cds/urcu/details/gpb.h b/cds/urcu/details/gpb.h index 697925da..5ad75d13 100644 --- a/cds/urcu/details/gpb.h +++ b/cds/urcu/details/gpb.h @@ -86,7 +86,9 @@ namespace cds { namespace urcu { typedef base_class::thread_gc thread_gc ; ///< Thread-side RCU part typedef typename thread_gc::scoped_lock scoped_lock ; ///< Access lock class - static bool const c_bBuffered = true ; ///< This RCU buffers disposed elements + //@cond + static bool const c_bBuffered = true ; ///< Bufferized RCU + //@endcond protected: //@cond @@ -146,7 +148,7 @@ namespace cds { namespace urcu { } } - // Return: true - synchronize has been called, false - otherwise + // Return: \p true - synchronize has been called, \p false - otherwise bool push_buffer( epoch_retired_ptr&& ep ) { bool bPushed = m_Buffer.push( ep ); @@ -191,7 +193,7 @@ namespace cds { namespace urcu { When the buffer becomes full \ref synchronize function is called to wait for the end of grace period and then to free all pointers from the buffer. */ - virtual void retire_ptr( retired_ptr& p ) + virtual void retire_ptr( retired_ptr& p ) override { if ( p.m_p ) push_buffer( epoch_retired_ptr( p, m_nCurEpoch.load( atomics::memory_order_relaxed ))); @@ -232,7 +234,6 @@ namespace cds { namespace urcu { bool synchronize( epoch_retired_ptr& ep ) { uint64_t nEpoch; - atomics::atomic_thread_fence( atomics::memory_order_acquire ); { std::unique_lock sl( m_Lock ); if ( ep.m_p && m_Buffer.push( ep )) @@ -242,7 +243,6 @@ namespace cds { namespace urcu { flip_and_wait(); } clear_buffer( nEpoch ); - atomics::atomic_thread_fence( atomics::memory_order_release ); return true; } //@endcond