/*
This file is a part of libcds - Concurrent Data Structures library
- (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+ (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017
Source code repo: http://github.com/khizmax/libcds/
Download: http://sourceforge.net/projects/libcds/files/
-
+
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef CDSLIB_INTRUSIVE_MSQUEUE_H
void operator()( value_type * p ) const
{
assert( p != nullptr );
- MSQueue::clear_links( node_traits::to_node_ptr( p ) );
+ MSQueue::clear_links( node_traits::to_node_ptr( p ));
disposer()(p);
}
};
if ( p != &m_Dummy )
- gc::template retire<disposer_thunk>( node_traits::to_value_ptr( p ) );
+ gc::template retire<disposer_thunk>( node_traits::to_value_ptr( p ));
}
//@endcond
node_type * pHead = m_pHead.load(memory_model::memory_order_relaxed);
assert( pHead != nullptr );
- assert( pHead == m_pTail.load(memory_model::memory_order_relaxed) );
+ assert( pHead == m_pTail.load(memory_model::memory_order_relaxed));
m_pHead.store( nullptr, memory_model::memory_order_relaxed );
m_pTail.store( nullptr, memory_model::memory_order_relaxed );
bool empty() const
{
typename gc::Guard guard;
- node_type * p = guard.protect( m_pHead, []( node_type * p ) -> value_type * { return node_traits::to_value_ptr( p );});
+ node_type * p = guard.protect( m_pHead, []( node_type * pNode ) -> value_type * { return node_traits::to_value_ptr( pNode );});
return p->m_pNext.load( memory_model::memory_order_relaxed ) == nullptr;
}
*/
void clear()
{
- while ( dequeue() );
+ while ( dequeue());
}
/// Returns queue's item count