for all x where link[x] of node is reference-counted do
retry:
node1 := link[x];
- if node1 != NULL and node1.m_bDeleted then
+ if node1 != nullptr and node1.m_bDeleted then
node2 := node1->link[x];
pGC->CASRef( this->link[x], node1, node2 );
pGC->releaseRef( node2 );
void terminate( ThreadGC * pGC, bool bConcurrent)
if !bConcurrent
for all this->link where link is reference-counted do
- link := NULL;
+ link := nullptr;
else
for all this->link where link is reference-counted do
repeat node1 := link;
- until pGC->CASRef(link,node1,NULL);
+ until pGC->CASRef(link,node1,nullptr);
\endcode
*/
virtual void terminate( ThreadGC * pGC, bool bConcurrent ) = 0;
#endif
};
- /// "Global GC object is NULL" exception
+ /// "Global GC object is nullptr" exception
CDS_DECLARE_EXCEPTION( HRCGarbageCollectorEmpty, "Global cds::gc::hrc::GarbageCollector is NULL" );
/// Not enough required Hazard Pointer count
{
thread_list_node * m_pNext ; ///< next list record
ThreadGC * m_pOwner ; ///< Owner of record
- CDS_ATOMIC::atomic<std::thread::id> m_idOwner ; ///< Id of thread owned; 0 - record is free
+ CDS_ATOMIC::atomic<cds::OS::ThreadId> m_idOwner ; ///< Id of thread owned; 0 - record is free
bool m_bFree ; ///< Node is help-scanned
//@cond
: thread_descriptor( HzpMgr ),
m_pNext( nullptr ),
m_pOwner( nullptr ),
- m_idOwner( std::thread::id() ),
+ m_idOwner(cds::OS::c_NullThreadId),
m_bFree( false )
{}
~thread_list_node()
{
assert( m_pOwner == nullptr );
- assert( m_idOwner.load( CDS_ATOMIC::memory_order_relaxed ) == std::thread::id() );
+ assert( m_idOwner.load( CDS_ATOMIC::memory_order_relaxed ) == cds::OS::c_NullThreadId );
}
//@endcond
};