X-Git-Url: http://plrg.eecs.uci.edu/git/?p=libcds.git;a=blobdiff_plain;f=cds%2Fgc%2Fhrc%2Fhrc.h;h=09844d25420c3d5222c45a4549658116da276c8c;hp=9fe760f74e03b0199877942b90d0a034a22f3737;hb=98aa954aa9d1b640f6f6d81018542eec1c2046bb;hpb=5c0c4501b3991ad3ef71f7c4249e00fb5f74010b diff --git a/cds/gc/hrc/hrc.h b/cds/gc/hrc/hrc.h index 9fe760f7..09844d25 100644 --- a/cds/gc/hrc/hrc.h +++ b/cds/gc/hrc/hrc.h @@ -300,15 +300,15 @@ namespace cds { namespace gc { //@cond thread_list_node( const GarbageCollector& HzpMgr ) : thread_descriptor( HzpMgr ), - m_pNext(null_ptr()), - m_pOwner( null_ptr() ), + m_pNext( nullptr ), + m_pOwner( nullptr ), m_idOwner( cds::OS::nullThreadId() ), m_bFree( false ) {} ~thread_list_node() { - assert( m_pOwner == null_ptr() ); + assert( m_pOwner == nullptr ); assert( m_idOwner.load(CDS_ATOMIC::memory_order_relaxed) == cds::OS::nullThreadId() ); } //@endcond @@ -371,7 +371,7 @@ namespace cds { namespace gc { /// Checks if global GC object is constructed and may be used static bool isUsed() { - return m_pGC != null_ptr(); + return m_pGC != nullptr; } /// Get max count of hazard pointers as defined in @ref Construct call @@ -480,7 +480,7 @@ namespace cds { namespace gc { //@cond ThreadGC() : m_gc( GarbageCollector::instance() ) - , m_pDesc( null_ptr() ) + , m_pDesc( nullptr ) {} ~ThreadGC() { @@ -489,7 +489,7 @@ namespace cds { namespace gc { //@endcond /// Checks if thread GC is initialized - bool isInitialized() const { return m_pDesc != null_ptr() ; } + bool isInitialized() const { return m_pDesc != nullptr; } /// Initialization. Multiple calls is allowed void init() @@ -505,7 +505,7 @@ namespace cds { namespace gc { cleanUpLocal(); m_gc.Scan( this ); details::thread_descriptor * pRec = m_pDesc; - m_pDesc = null_ptr(); + m_pDesc = nullptr; if ( pRec ) m_gc.retireHRCThreadDesc( pRec ); } @@ -515,14 +515,14 @@ namespace cds { namespace gc { /// Initializes HP guard \p guard details::HPGuard& allocGuard() { - assert( m_pDesc != null_ptr() ); + assert( m_pDesc != nullptr ); return m_pDesc->m_hzp.alloc(); } /// Frees HP guard \p guard void freeGuard( details::HPGuard& guard ) { - assert( m_pDesc != null_ptr() ); + assert( m_pDesc != nullptr ); m_pDesc->m_hzp.free( guard ); } @@ -530,7 +530,7 @@ namespace cds { namespace gc { template void allocGuard( details::HPArray& arr ) { - assert( m_pDesc != null_ptr() ); + assert( m_pDesc != nullptr ); m_pDesc->m_hzp.alloc( arr ); } @@ -538,7 +538,7 @@ namespace cds { namespace gc { template void freeGuard( details::HPArray& arr ) { - assert( m_pDesc != null_ptr() ); + assert( m_pDesc != nullptr ); m_pDesc->m_hzp.free( arr ); }