From: khizmax Date: Sat, 29 Nov 2014 11:46:16 +0000 (+0300) Subject: Renamed isThreadAlive to is_thread_alive X-Git-Tag: v2.0.0~39 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=41c348cac118e9699347aed5f73b6606ffca9cf6;p=libcds.git Renamed isThreadAlive to is_thread_alive --- diff --git a/cds/os/posix/thread.h b/cds/os/posix/thread.h index b2531847..51f1ef2b 100644 --- a/cds/os/posix/thread.h +++ b/cds/os/posix/thread.h @@ -20,7 +20,7 @@ namespace cds { namespace OS { } /// Checks if thread \p id is alive - static inline bool isThreadAlive( ThreadId id ) + static inline bool is_thread_alive( ThreadId id ) { // if sig is zero, error checking is performed but no signal is actually sent. // ESRCH - No thread could be found corresponding to that specified by the given thread ID diff --git a/cds/os/win/thread.h b/cds/os/win/thread.h index 15fd57f2..2650fd06 100644 --- a/cds/os/win/thread.h +++ b/cds/os/win/thread.h @@ -19,7 +19,7 @@ namespace cds { namespace OS { } /// Tests whether the thread is alive - static inline bool isThreadAlive( ThreadId id ) + static inline bool is_thread_alive( ThreadId id ) { HANDLE h = ::OpenThread( SYNCHRONIZE, FALSE, id ); if ( h == nullptr ) @@ -35,7 +35,7 @@ namespace cds { namespace OS { #ifndef CDS_CXX11_INLINE_NAMESPACE_SUPPORT using Win32::ThreadId; using Win32::get_current_thread_id; - using Win32::isThreadAlive; + using Win32::is_thread_alive; #endif //@endcond diff --git a/cds/urcu/details/base.h b/cds/urcu/details/base.h index b480ccff..5795d2d2 100644 --- a/cds/urcu/details/base.h +++ b/cds/urcu/details/base.h @@ -392,7 +392,7 @@ namespace cds { assert( p->m_list.m_idOwner.load( atomics::memory_order_relaxed ) == nullThreadId || p->m_list.m_idOwner.load( atomics::memory_order_relaxed ) == mainThreadId - || !cds::OS::isThreadAlive( p->m_list.m_idOwner.load( atomics::memory_order_relaxed ) ) + || !cds::OS::is_thread_alive( p->m_list.m_idOwner.load( atomics::memory_order_relaxed ) ) ); al.Delete( p ); diff --git a/src/hp_gc.cpp b/src/hp_gc.cpp index 7bbcb73e..15166790 100644 --- a/src/hp_gc.cpp +++ b/src/hp_gc.cpp @@ -68,7 +68,7 @@ namespace cds { namespace gc { for ( hplist_node * hprec = pHead; hprec; hprec = pNext ) { assert( hprec->m_idOwner.load( atomics::memory_order_relaxed ) == nullThreadId || hprec->m_idOwner.load( atomics::memory_order_relaxed ) == mainThreadId - || !cds::OS::isThreadAlive( hprec->m_idOwner.load( atomics::memory_order_relaxed ) ) + || !cds::OS::is_thread_alive( hprec->m_idOwner.load( atomics::memory_order_relaxed ) ) ); details::retired_vector& vect = hprec->m_arrRetired; details::retired_vector::iterator itRetired = vect.begin(); @@ -304,7 +304,7 @@ namespace cds { namespace gc { // Several threads may work concurrently so we use atomic technique only. { cds::OS::ThreadId curOwner = hprec->m_idOwner.load(atomics::memory_order_acquire); - if ( curOwner == nullThreadId || !cds::OS::isThreadAlive( curOwner )) { + if ( curOwner == nullThreadId || !cds::OS::is_thread_alive( curOwner )) { if ( !hprec->m_idOwner.compare_exchange_strong( curOwner, curThreadId, atomics::memory_order_release, atomics::memory_order_relaxed )) continue; }