/**
In debug mode: if \p bLocked = true then spin-lock is made owned by current thread
*/
- spin_lock( bool bLocked ) CDS_NOEXCEPT
+ explicit spin_lock( bool bLocked ) CDS_NOEXCEPT
# ifdef CDS_DEBUG
: m_dbgOwnerId( bLocked ? cds::OS::get_current_thread_id() : cds::OS::c_NullThreadId )
# endif
{}
/// Construct object for specified state
- explicit reentrant_spin_lock( bool bLocked ) CDS_NOEXCEPT_( noexcept(lock()))
+ explicit reentrant_spin_lock( bool bLocked )
: m_spin(0)
, m_OwnerId( OS::c_NullThreadId )
{
}
/// Try to lock the object
- bool try_lock( unsigned int nTryCount ) CDS_NOEXCEPT_( noexcept( try_acquire( nTryCount )))
+ bool try_lock( unsigned int nTryCount ) CDS_NOEXCEPT_( noexcept( std::declval<reentrant_spin_lock>().try_acquire( nTryCount )))
{
thread_id tid = OS::get_current_thread_id();
if ( try_taken_lock( tid ) )
}
/// Lock the object waits if it is busy
- void lock() CDS_NOEXCEPT_( noexcept( acquire()))
+ void lock() CDS_NOEXCEPT_( noexcept( std::declval<reentrant_spin_lock>().acquire()))
{
thread_id tid = OS::get_current_thread_id();
if ( !try_taken_lock( tid ) ) {