projects
/
libcds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
replace null_ptr<>() with nullptr
[libcds.git]
/
cds
/
gc
/
hrc
/
hrc.h
diff --git
a/cds/gc/hrc/hrc.h
b/cds/gc/hrc/hrc.h
index 9fe760f74e03b0199877942b90d0a034a22f3737..09844d25420c3d5222c45a4549658116da276c8c 100644
(file)
--- 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 ),
//@cond
thread_list_node( const GarbageCollector& HzpMgr )
: thread_descriptor( HzpMgr ),
- m_pNext(
null_ptr<thread_list_node *>()
),
- m_pOwner( null
_ptr<ThreadGC *>()
),
+ m_pNext(
nullptr
),
+ m_pOwner( null
ptr
),
m_idOwner( cds::OS::nullThreadId() ),
m_bFree( false )
{}
~thread_list_node()
{
m_idOwner( cds::OS::nullThreadId() ),
m_bFree( false )
{}
~thread_list_node()
{
- assert( m_pOwner == null
_ptr<ThreadGC *>()
);
+ assert( m_pOwner == null
ptr
);
assert( m_idOwner.load(CDS_ATOMIC::memory_order_relaxed) == cds::OS::nullThreadId() );
}
//@endcond
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()
{
/// Checks if global GC object is constructed and may be used
static bool isUsed()
{
- return m_pGC != null
_ptr<GarbageCollector *>()
;
+ return m_pGC != null
ptr
;
}
/// Get max count of hazard pointers as defined in @ref Construct call
}
/// 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() )
//@cond
ThreadGC()
: m_gc( GarbageCollector::instance() )
- , m_pDesc( null
_ptr<details::thread_descriptor *>()
)
+ , m_pDesc( null
ptr
)
{}
~ThreadGC()
{
{}
~ThreadGC()
{
@@
-489,7
+489,7
@@
namespace cds { namespace gc {
//@endcond
/// Checks if thread GC is initialized
//@endcond
/// Checks if thread GC is initialized
- bool isInitialized() const
{ return m_pDesc != null_ptr<details::thread_descriptor *>()
; }
+ bool isInitialized() const
{ return m_pDesc != nullptr
; }
/// Initialization. Multiple calls is allowed
void init()
/// 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;
cleanUpLocal();
m_gc.Scan( this );
details::thread_descriptor * pRec = m_pDesc;
- m_pDesc = null
_ptr<details::thread_descriptor *>()
;
+ m_pDesc = null
ptr
;
if ( pRec )
m_gc.retireHRCThreadDesc( pRec );
}
if ( pRec )
m_gc.retireHRCThreadDesc( pRec );
}
@@
-515,14
+515,14
@@
namespace cds { namespace gc {
/// Initializes HP guard \p guard
details::HPGuard& allocGuard()
{
/// Initializes HP guard \p guard
details::HPGuard& allocGuard()
{
- assert( m_pDesc != null
_ptr<details::thread_descriptor *>()
);
+ assert( m_pDesc != null
ptr
);
return m_pDesc->m_hzp.alloc();
}
/// Frees HP guard \p guard
void freeGuard( details::HPGuard& guard )
{
return m_pDesc->m_hzp.alloc();
}
/// Frees HP guard \p guard
void freeGuard( details::HPGuard& guard )
{
- assert( m_pDesc != null
_ptr<details::thread_descriptor *>()
);
+ assert( m_pDesc != null
ptr
);
m_pDesc->m_hzp.free( guard );
}
m_pDesc->m_hzp.free( guard );
}
@@
-530,7
+530,7
@@
namespace cds { namespace gc {
template <size_t Count>
void allocGuard( details::HPArray<Count>& arr )
{
template <size_t Count>
void allocGuard( details::HPArray<Count>& arr )
{
- assert( m_pDesc != null
_ptr<details::thread_descriptor *>()
);
+ assert( m_pDesc != null
ptr
);
m_pDesc->m_hzp.alloc( arr );
}
m_pDesc->m_hzp.alloc( arr );
}
@@
-538,7
+538,7
@@
namespace cds { namespace gc {
template <size_t Count>
void freeGuard( details::HPArray<Count>& arr )
{
template <size_t Count>
void freeGuard( details::HPArray<Count>& arr )
{
- assert( m_pDesc != null
_ptr<details::thread_descriptor *>()
);
+ assert( m_pDesc != null
ptr
);
m_pDesc->m_hzp.free( arr );
}
m_pDesc->m_hzp.free( arr );
}