*/
#include <thread>
+#include <chrono>
+#include <cds/details/defs.h>
#include <cds/compiler/backoff.h>
-#include <cds/details/std/chrono.h>
namespace cds {
/// Different backoff schemes
\endcode
*/
- template <class Duration = cds_std::chrono::milliseconds, typename Tag=void >
+ template <class Duration = cds::chrono::milliseconds, typename Tag=void >
class delay
{
public:
The declaration <tt>cds::backoff::delay_of< 5 > bkoff</tt> is equal for
<tt>cds::backoff::delay<> bkoff(5)</tt>.
*/
- template <unsigned int Timeout, class Duration = cds_std::chrono::milliseconds >
+ template <unsigned int Timeout, class Duration = cds::chrono::milliseconds >
class delay_of: public delay<Duration>
{
//@cond
#ifndef __CDS_ALGO_FLAT_COMBINING_H
#define __CDS_ALGO_FLAT_COMBINING_H
+#include <mutex>
#include <cds/cxx11_atomic.h>
#include <cds/details/allocator.h>
#include <cds/algo/backoff_strategy.h>
#include <cds/lock/spinlock.h>
-#include <cds/details/std/mutex.h> // lock_guard
#include <cds/opt/options.h>
#include <cds/algo/int_algo.h>
#include <boost/thread/tss.hpp> // thread_specific_ptr
protected:
//@cond
typedef cds::details::Allocator< publication_record_type, allocator > cxx11_allocator; ///< internal helper cds::details::Allocator
- typedef cds_std::lock_guard<global_lock_type> lock_guard;
+ typedef std::lock_guard<global_lock_type> lock_guard;
//@endcond
protected:
{
if ( m_Mutex.try_lock() ) {
// The thread becomes a combiner
- lock_guard l( m_Mutex, cds_std::adopt_lock_t() );
+ lock_guard l( m_Mutex, std::adopt_lock_t() );
// The record pRec can be excluded from publication list. Re-publish it
republish( pRec );
// There is another combiner, wait while it executes our request
if ( !wait_for_combining( pRec ) ) {
// The thread becomes a combiner
- lock_guard l( m_Mutex, cds_std::adopt_lock_t() );
+ lock_guard l( m_Mutex, std::adopt_lock_t() );
// The record pRec can be excluded from publication list. Re-publish it
republish( pRec );
{
if ( m_Mutex.try_lock() ) {
// The thread becomes a combiner
- lock_guard l( m_Mutex, cds_std::adopt_lock_t() );
+ lock_guard l( m_Mutex, std::adopt_lock_t() );
// The record pRec can be excluded from publication list. Re-publish it
republish( pRec );
// There is another combiner, wait while it executes our request
if ( !wait_for_combining( pRec ) ) {
// The thread becomes a combiner
- lock_guard l( m_Mutex, cds_std::adopt_lock_t() );
+ lock_guard l( m_Mutex, std::adopt_lock_t() );
// The record pRec can be excluded from publication list. Re-publish it
republish( pRec );
} // namespace cds
-/// @defgroup cds_cxx11_stdlib_wrapper New C++11 standard library support
-
-/// C++11 standard library wrapper namespace
-/** @ingroup cds_cxx11_stdlib_wrapper
- libcds needs support from new features defined in C++11 standard library.
- In case when an old compiler and corresponding \p std library has no required feature
- the \p boost library is used if possible. The \p %cds_std namespace is a wrapper for new C++11 stdlib classes:
- - if the compiler supports new feature, this feature places (with \p using directive) into \p %cds_std namespace "as is"
- - otherwise the \p boost analog is used and it places into \p %cds_std namespace too
-
- For example, for class \p std::mutex the \p libcds does the following:
- - for old compiler: \code
- #include <boost/thread/mutex.hpp>
- namespace cds_std {
- using boost::mutex;
- }
- \endcode
- - for C++11-ready compiler: \code
- #include <mutex>
- namespace cds_std {
- using std::mutex;
- }
- \endcode
-
- Everywhere in \p libcds the class \p %cds_std::mutex is used instead of \p std::mutex.
-
- Note, not all C++11 features are contained in \p %cds_std but only required by \p libcds.
-
- In future when all compilers will be C++11-ready we can transform the \p libcds
- to new C++11 standard library changing \p %cds_std namespace to native \p std.
-*/
-namespace cds_std {}
-
//@cond
#ifdef _DEBUG
# define cds_assert(X) assert(X)
+++ /dev/null
-//$$CDS-header$$
-
-#ifndef __CDS_DETAILS_STD_CHRONO_H
-#define __CDS_DETAILS_STD_CHRONO_H
-
-//@cond
-
-#include <cds/details/defs.h>
-
-#ifdef CDS_CXX11_STDLIB_CHRONO
-# include <chrono>
-namespace cds_std {
- namespace chrono = std::chrono;
-}
-#else
-# include <boost/chrono.hpp>
-namespace cds_std {
- namespace chrono = boost::chrono;
-}
-#endif
-
-//@endcond
-
-#endif // #ifndef __CDS_DETAILS_STD_CHRONO_H
+++ /dev/null
-//$$CDS-header$$
-
-#ifndef __CDS_DETAILS_STD_CONDITION_VARIABLE_H
-#define __CDS_DETAILS_STD_CONDITION_VARIABLE_H
-
-//@cond
-
-#include <cds/details/defs.h>
-
-#ifdef CDS_CXX11_STDLIB_CONDITION_VARIABLE
-# include <condition_variable>
- namespace cds_std {
- using std::condition_variable;
- using std::condition_variable_any;
- }
-#else
-# include <boost/thread/condition_variable.hpp>
- namespace cds_std {
- using boost::condition_variable;
- using boost::condition_variable_any;
- }
-#endif
-
-//@endcond
-
-#endif // #ifndef __CDS_DETAILS_STD_CONDITION_VARIABLE_H
+++ /dev/null
-//$$CDS-header$$
-
-#ifndef __CDS_DETAILS_STD_MUTEX_H
-#define __CDS_DETAILS_STD_MUTEX_H
-
-//@cond
-
-#include <cds/details/defs.h>
-
-#ifdef CDS_CXX11_STDLIB_MUTEX
-# include <mutex>
- namespace cds_std {
- using std::mutex;
- using std::recursive_mutex;
- using std::unique_lock;
- using std::lock_guard;
- using std::adopt_lock_t;
- }
-#else
-# include <boost/thread/mutex.hpp>
-# include <boost/thread/recursive_mutex.hpp>
-# if BOOST_VERSION >= 105300
-# include <boost/thread/locks.hpp>
-# include <boost/thread/lock_guard.hpp>
-# else
-# include <boost/thread.hpp>
-# endif
- namespace cds_std {
- using boost::mutex;
- using boost::recursive_mutex;
- using boost::unique_lock;
- using boost::lock_guard;
- using boost::adopt_lock_t;
- }
-#endif
-
-//@endcond
-
-#endif // #ifndef __CDS_DETAILS_STD_MUTEX_H
#include <memory>
#include <type_traits>
+#include <mutex>
#include <cds/intrusive/base.h>
#include <cds/opt/compare.h>
#include <cds/opt/hash.h>
#include <cds/details/functor_wrapper.h>
#include <cds/lock/spinlock.h>
-#include <cds/details/std/mutex.h>
-//#include <boost/thread/recursive_mutex.hpp>
namespace cds { namespace intrusive {
The policy contains an internal array of \p RecursiveLock locks.
Template arguments:
- - \p RecursiveLock - the type of recursive mutex. The default is \p cds_std::recursive_mutex. The mutex type should be default-constructible.
+ - \p RecursiveLock - the type of recursive mutex. The default is \p std::recursive_mutex. The mutex type should be default-constructible.
Note that a recursive spin-lock is not suitable for lock striping for performance reason.
- \p Arity - unsigned int constant that specifies an arity. The arity is the count of hash functors, i.e., the
count of lock arrays. Default value is 2.
class according to its \p opt::stat option.
*/
template <
- class RecursiveLock = cds_std::recursive_mutex,
+ class RecursiveLock = std::recursive_mutex,
unsigned int Arity = 2,
class Alloc = CDS_DEFAULT_ALLOCATOR,
class Stat = empty_striping_stat
Template arguments:
- \p RecursiveLock - the type of mutex. Reentrant (recursive) mutex is required.
- The default is \p cds_std::recursive_mutex. The mutex type should be default-constructible.
+ The default is \p std::recursive_mutex. The mutex type should be default-constructible.
- \p Arity - unsigned int constant that specifies an arity. The arity is the count of hash functors, i.e., the
count of lock arrays. Default value is 2.
- \p BackOff - back-off strategy. Default is cds::backoff::yield
class according to its \p opt::stat option.
*/
template <
- class RecursiveLock = cds_std::recursive_mutex,
+ class RecursiveLock = std::recursive_mutex,
unsigned int Arity = 2,
typename BackOff = cds::backoff::yield,
class Alloc = CDS_DEFAULT_ALLOCATOR,
#ifndef __CDS_INTRUSIVE_SEGMENTED_QUEUE_H
#define __CDS_INTRUSIVE_SEGMENTED_QUEUE_H
+#include <mutex>
#include <cds/intrusive/base.h>
#include <cds/details/marked_ptr.h>
#include <cds/algo/int_algo.h>
-#include <cds/details/std/mutex.h>
#include <cds/lock/spinlock.h>
#include <cds/opt/permutation.h>
class segment_list
{
typedef boost::intrusive::slist< segment, boost::intrusive::cache_last< true > > list_impl;
- typedef cds_std::unique_lock< lock_type > scoped_lock;
+ typedef std::unique_lock< lock_type > scoped_lock;
aligned_segment_ptr m_pHead;
aligned_segment_ptr m_pTail;
#define __CDS_INTRUSIVE_STRIPED_SET_STRIPING_POLICY_H
#include <memory>
+#include <mutex>
#include <cds/lock/array.h>
#include <cds/os/thread.h>
#include <cds/lock/spinlock.h>
-#include <cds/details/std/mutex.h>
-//#include <boost/thread/mutex.hpp>
-//#include <boost/thread/recursive_mutex.hpp>
-
-
namespace cds { namespace intrusive { namespace striped_set {
/// Lock striping concurrent access policy
The policy contains an internal array of \p Lock locks.
Template arguments:
- - \p Lock - the type of mutex. The default is \p cds_std::mutex. The mutex type should be default-constructible.
+ - \p Lock - the type of mutex. The default is \p std::mutex. The mutex type should be default-constructible.
Note that a spin-lock is not so good suitable for lock striping for performance reason.
- \p Alloc - allocator type used for lock array memory allocation. Default is \p CDS_DEFAULT_ALLOCATOR.
*/
- template <class Lock = cds_std::mutex, class Alloc = CDS_DEFAULT_ALLOCATOR >
+ template <class Lock = std::mutex, class Alloc = CDS_DEFAULT_ALLOCATOR >
class striping
{
public:
Template arguments:
- \p RecursiveLock - the type of mutex. Reentrant (recursive) mutex is required.
- The default is \p cds_std::recursive_mutex. The mutex type should be default-constructible.
+ The default is \p std::recursive_mutex. The mutex type should be default-constructible.
- \p BackOff - back-off strategy. Default is cds::backoff::yield
- \p Alloc - allocator type used for lock array memory allocation. Default is \p CDS_DEFAULT_ALLOCATOR.
*/
template <
- class RecursiveLock = cds_std::recursive_mutex,
+ class RecursiveLock = std::recursive_mutex,
typename BackOff = cds::backoff::yield,
class Alloc = CDS_DEFAULT_ALLOCATOR>
class refinable
#ifndef _CDS_URCU_DETAILS_GPB_H
#define _CDS_URCU_DETAILS_GPB_H
+#include <mutex>
#include <cds/urcu/details/gp.h>
#include <cds/algo/backoff_strategy.h>
#include <cds/container/vyukov_mpmc_cycle_queue.h>
-#include <cds/details/std/mutex.h>
-
namespace cds { namespace urcu {
/// User-space general-purpose RCU with deferred (buffered) reclamation
epoch_retired_ptr
,cds::opt::buffer< cds::opt::v::dynamic_buffer< epoch_retired_ptr > >
>
- ,class Lock = cds_std::mutex
+ ,class Lock = std::mutex
,class Backoff = cds::backoff::Default
>
class general_buffered: public details::gp_singleton< general_buffered_tag >
#ifndef _CDS_URCU_DETAILS_GPI_H
#define _CDS_URCU_DETAILS_GPI_H
+#include <mutex>
#include <cds/urcu/details/gp.h>
#include <cds/algo/backoff_strategy.h>
#include <cds/lock/scoped_lock.h>
-#include <cds/details/std/mutex.h>
-
namespace cds { namespace urcu {
/// User-space general-purpose RCU with immediate reclamation
- \p Backoff - back-off schema, default is cds::backoff::Default
*/
template <
- class Lock = cds_std::mutex
+ class Lock = std::mutex
,class Backoff = cds::backoff::Default
>
class general_instant: public details::gp_singleton< general_instant_tag >
epoch_retired_ptr
,cds::opt::buffer< cds::opt::v::dynamic_buffer< epoch_retired_ptr > >
>
- ,class Lock = cds_std::mutex
+ ,class Lock = std::mutex
,class DisposerThread = dispose_thread<Buffer>
,class Backoff = cds::backoff::Default
>
#include <cds/urcu/details/sh.h>
#ifdef CDS_URCU_SIGNAL_HANDLING_ENABLED
+#include <mutex>
#include <cds/algo/backoff_strategy.h>
#include <cds/container/vyukov_mpmc_cycle_queue.h>
-#include <cds/details/std/mutex.h>
-
namespace cds { namespace urcu {
/// User-space signal-handled RCU with deferred (buffered) reclamation
epoch_retired_ptr
,cds::opt::buffer< cds::opt::v::dynamic_buffer< epoch_retired_ptr > >
>
- ,class Lock = cds_std::mutex
+ ,class Lock = std::mutex
,class Backoff = cds::backoff::Default
>
class signal_buffered: public details::sh_singleton< signal_buffered_tag >
epoch_retired_ptr
,cds::opt::buffer< cds::opt::v::dynamic_buffer< epoch_retired_ptr > >
>
- ,class Lock = cds_std::mutex
+ ,class Lock = std::mutex
,class DisposerThread = dispose_thread<Buffer>
,class Backoff = cds::backoff::Default
>
#include <memory>
#include <thread>
-#include <cds/details/std/mutex.h>
-#include <cds/details/std/condition_variable.h>
+#include <mutex>
+#include <condition_variable>
#include <cds/details/aligned_type.h>
namespace cds { namespace urcu {
private:
//@cond
typedef std::thread thread_type;
- typedef cds_std::mutex mutex_type;
- typedef cds_std::condition_variable condvar_type;
- typedef cds_std::unique_lock< mutex_type > unique_lock;
+ typedef std::mutex mutex_type;
+ typedef std::condition_variable condvar_type;
+ typedef std::unique_lock< mutex_type > unique_lock;
class dispose_thread_starter: public thread_type
{
retired_ptr
,cds::opt::buffer< cds::opt::v::dynamic_buffer< retired_ptr > >
>
- ,class Lock = cds_std::mutex
+ ,class Lock = std::mutex
,class Backoff = cds::backoff::Default
#else
class Buffer
*/
template <
#ifdef CDS_DOXGEN_INVOKED
- class Lock = cds_std::mutex
+ class Lock = std::mutex
,class Backoff = cds::backoff::Default
#else
class Lock
epoch_retired_ptr
,cds::opt::buffer< cds::opt::v::dynamic_buffer< epoch_retired_ptr > >
>
- ,class Lock = cds_std::mutex
+ ,class Lock = std::mutex
,class DisposerThread = dispose_thread<Buffer>
,class Backoff = cds::backoff::Default
#else
retired_ptr
,cds::opt::buffer< cds::opt::v::dynamic_buffer< retired_ptr > >
>
- ,class Lock = cds_std::mutex
+ ,class Lock = std::mutex
,class Backoff = cds::backoff::Default
#else
class Buffer
epoch_retired_ptr
,cds::opt::buffer< cds::opt::v::dynamic_buffer< epoch_retired_ptr > >
>
- ,class Lock = cds_std::mutex
+ ,class Lock = std::mutex
,class DisposerThread = dispose_thread<Buffer>
,class Backoff = cds::backoff::Default
#else
<ClInclude Include="..\..\..\cds\details\lib.h" />\r
<ClInclude Include="..\..\..\cds\details\numtraits.h" />\r
<ClInclude Include="..\..\..\cds\details\static_functor.h" />\r
- <ClInclude Include="..\..\..\cds\details\std\condition_variable.h" />\r
- <ClInclude Include="..\..\..\cds\details\std\mutex.h" />\r
- <ClInclude Include="..\..\..\cds\details\std\chrono.h" />\r
<ClInclude Include="..\..\..\cds\gc\all.h" />\r
<ClInclude Include="..\..\..\cds\gc\exception.h" />\r
<ClInclude Include="..\..\..\cds\gc\gc_fwd.h" />\r
<Filter Include="Header Files\cds\compiler\clang">\r
<UniqueIdentifier>{ae97048d-bd62-4ff2-be28-3c84338e7186}</UniqueIdentifier>\r
</Filter>\r
- <Filter Include="Header Files\cds\details\std">\r
- <UniqueIdentifier>{e6c65d81-ad06-40f3-be4e-ddaab3295bf3}</UniqueIdentifier>\r
- </Filter>\r
<Filter Include="Header Files\cds\intrusive\striped_set">\r
<UniqueIdentifier>{560b4d4c-71e1-443c-942e-dcc5a275c7c2}</UniqueIdentifier>\r
</Filter>\r
<ClInclude Include="..\..\..\cds\container\details\make_skip_list_map.h">\r
<Filter>Header Files\cds\container\details</Filter>\r
</ClInclude>\r
- <ClInclude Include="..\..\..\cds\details\std\condition_variable.h">\r
- <Filter>Header Files\cds\details\std</Filter>\r
- </ClInclude>\r
- <ClInclude Include="..\..\..\cds\details\std\mutex.h">\r
- <Filter>Header Files\cds\details\std</Filter>\r
- </ClInclude>\r
- <ClInclude Include="..\..\..\cds\details\std\chrono.h">\r
- <Filter>Header Files\cds\details\std</Filter>\r
- </ClInclude>\r
<ClInclude Include="..\..\..\cds\details\static_functor.h">\r
<Filter>Header Files\cds\details</Filter>\r
</ClInclude>\r
typedef cds::container::FCDeque<int, std::deque<int>,
cds::container::fcdeque::make_traits<
cds::opt::enable_elimination< true >
- ,cds::opt::lock_type< cds_std::mutex >
+ ,cds::opt::lock_type< std::mutex >
>::type
> deque_type;
test<deque_type>();
typedef cds::container::FCDeque<int, boost::container::deque<int>,
cds::container::fcdeque::make_traits<
cds::opt::enable_elimination< true >
- ,cds::opt::lock_type< cds_std::mutex >
+ ,cds::opt::lock_type< std::mutex >
>::type
> deque_type;
test<deque_type>();
,std::deque<PQueueHdrTest::value_type>
>
,cds::container::fcpqueue::make_traits<
- cds::opt::lock_type< cds_std::mutex >
+ cds::opt::lock_type< std::mutex >
>::type
> pqueue_type;
test_fcpqueue<pqueue_type>();
PQueueHdrTest::value_type
,std::priority_queue< PQueueHdrTest::value_type >
,cds::container::fcpqueue::make_traits<
- cds::opt::lock_type< cds_std::mutex >
+ cds::opt::lock_type< std::mutex >
>::type
> pqueue_type;
test_fcpqueue<pqueue_type>();
#include "priority_queue/hdr_intrusive_pqueue.h"
#include <cds/intrusive/mspriority_queue.h>
-#include <cds/details/std/mutex.h>
+#include <mutex>
namespace priority_queue {
namespace intrusive_pqueue {
cds::intrusive::mspriority_queue::make_traits<
cds::opt::buffer< buffer_type >
,cds::opt::compare< IntrusivePQueueHdrTest::compare >
- ,cds::opt::lock_type<cds_std::mutex>
+ ,cds::opt::lock_type<std::mutex>
>::type
> pqueue;
#include "priority_queue/hdr_intrusive_pqueue.h"
#include <cds/intrusive/mspriority_queue.h>
-#include <cds/details/std/mutex.h>
+#include <mutex>
namespace priority_queue {
namespace intrusive_pqueue {
cds::intrusive::mspriority_queue::make_traits<
cds::opt::buffer< buffer_type >
,cds::opt::compare< IntrusivePQueueHdrTest::compare >
- ,cds::opt::lock_type<cds_std::mutex>
+ ,cds::opt::lock_type<std::mutex>
>::type
> pqueue;
#include "priority_queue/hdr_pqueue.h"
#include <cds/container/mspriority_queue.h>
-#include <cds/details/std/mutex.h>
+#include <mutex>
namespace priority_queue {
namespace pqueue {
cds::container::mspriority_queue::make_traits<
cds::opt::buffer< buffer_type >
,cds::opt::compare< PQueueHdrTest::compare >
- ,cds::opt::lock_type<cds_std::mutex>
+ ,cds::opt::lock_type<std::mutex>
>::type
> pqueue;
#include "priority_queue/hdr_pqueue.h"
#include <cds/container/mspriority_queue.h>
-#include <cds/details/std/mutex.h>
+#include <mutex>
namespace priority_queue {
namespace pqueue {
cds::container::mspriority_queue::make_traits<
cds::opt::buffer< buffer_type >
,cds::opt::compare< PQueueHdrTest::compare >
- ,cds::opt::lock_type<cds_std::mutex>
+ ,cds::opt::lock_type<std::mutex>
>::type
> pqueue;
{
typedef cds::container::FCQueue<int, std::queue< int, std::deque<int> >,
cds::container::fcqueue::make_traits<
- cds::opt::lock_type< cds_std::mutex >
+ cds::opt::lock_type< std::mutex >
>::type
> queue_type;
testFCQueue<queue_type>();
{
typedef cds::container::FCQueue<int, std::queue<int, std::list<int> >,
cds::container::fcqueue::make_traits<
- cds::opt::lock_type< cds_std::mutex >
+ cds::opt::lock_type< std::mutex >
>::type
> queue_type;
testFCQueue<queue_type>();
cds::intrusive::fcqueue::make_traits<
cds::intrusive::opt::disposer< disposer >
,cds::opt::enable_elimination< true >
- ,cds::opt::lock_type< cds_std::mutex >
+ ,cds::opt::lock_type< std::mutex >
>::type
> queue_type;
cds::intrusive::fcqueue::make_traits<
cds::intrusive::opt::disposer< disposer >
,cds::opt::enable_elimination< true >
- ,cds::opt::lock_type< cds_std::mutex >
+ ,cds::opt::lock_type< std::mutex >
>::type
> queue_type;
typedef cds::intrusive::SegmentedQueue< cds::gc::HP, item,
cds::intrusive::segmented_queue::make_traits<
cds::intrusive::opt::disposer< Disposer >
- ,cds::opt::lock_type< cds_std::mutex >
+ ,cds::opt::lock_type< std::mutex >
>::type
> queue_type;
typedef cds::intrusive::SegmentedQueue< cds::gc::PTB, item,
cds::intrusive::segmented_queue::make_traits<
cds::intrusive::opt::disposer< Disposer >
- ,cds::opt::lock_type< cds_std::mutex >
+ ,cds::opt::lock_type< std::mutex >
>::type
> queue_type;
{
typedef cds::container::SegmentedQueue< cds::gc::HP, item,
cds::container::segmented_queue::make_traits<
- cds::opt::lock_type< cds_std::mutex >
+ cds::opt::lock_type< std::mutex >
>::type
> queue_type;
{
typedef cds::container::SegmentedQueue< cds::gc::PTB, item,
cds::container::segmented_queue::make_traits<
- cds::opt::lock_type< cds_std::mutex >
+ cds::opt::lock_type< std::mutex >
>::type
> queue_type;
typedef base_hook_item< boost::intrusive::slist_base_hook<> > value_type;
typedef cds::intrusive::FCStack< value_type, boost::intrusive::slist< value_type >,
cds::intrusive::fcstack::make_traits<
- cds::opt::lock_type< cds_std::mutex >
+ cds::opt::lock_type< std::mutex >
>::type
> stack_type;
test<stack_type>();
typedef base_hook_item< boost::intrusive::list_base_hook<> > value_type;
typedef cds::intrusive::FCStack< value_type, boost::intrusive::list< value_type >,
cds::intrusive::fcstack::make_traits<
- cds::opt::lock_type< cds_std::mutex >
+ cds::opt::lock_type< std::mutex >
>::type
> stack_type;
test<stack_type>();
#include <deque>
#include <boost/container/stable_vector.hpp>
#include <boost/container/deque.hpp>
-#include <cds/details/std/mutex.h>
+#include <mutex>
#include <cds/lock/spinlock.h>
#include "print_ellenbintree_stat.h"
typedef cc::MSPriorityQueue< Value,
typename cc::mspriority_queue::make_traits<
co::buffer< co::v::static_buffer< char, c_nBoundedCapacity > >
- ,co::lock_type<cds_std::mutex>
+ ,co::lock_type<std::mutex>
>::type
> MSPriorityQueue_static_mutex;
typedef cc::MSPriorityQueue< Value,
typename cc::mspriority_queue::make_traits<
co::buffer< co::v::dynamic_buffer< char > >
- ,co::lock_type<cds_std::mutex>
+ ,co::lock_type<std::mutex>
>::type
> MSPriorityQueue_dyn_mutex;
/// Standard priority_queue
typedef StdPQueue< Value, std::vector<Value>, cds::lock::Spin > StdPQueue_vector_spin;
- typedef StdPQueue< Value, std::vector<Value>, cds_std::mutex > StdPQueue_vector_mutex;
+ typedef StdPQueue< Value, std::vector<Value>, std::mutex > StdPQueue_vector_mutex;
typedef StdPQueue< Value, std::deque<Value>, cds::lock::Spin > StdPQueue_deque_spin;
- typedef StdPQueue< Value, std::deque<Value>, cds_std::mutex > StdPQueue_deque_mutex;
+ typedef StdPQueue< Value, std::deque<Value>, std::mutex > StdPQueue_deque_mutex;
};
}
};
- template <typename T, typename Lock=cds_std::mutex>
+ template <typename T, typename Lock=std::mutex>
class BoostSList
{
typedef boost::intrusive::slist< T, boost::intrusive::cache_last<true> > slist_type;
typedef Lock lock_type;
- typedef cds_std::lock_guard<lock_type> lock_guard;
+ typedef std::lock_guard<lock_type> lock_guard;
slist_type m_List;
mutable lock_type m_Lock;
class traits_SegmentedQueue_mutex_stat:
public cds::intrusive::segmented_queue::make_traits<
cds::opt::stat< cds::intrusive::segmented_queue::stat<> >
- ,cds::opt::lock_type< cds_std::mutex >
+ ,cds::opt::lock_type< std::mutex >
>::type
{};
class traits_SegmentedQueue_mutex:
public cds::intrusive::segmented_queue::make_traits<
- cds::opt::lock_type< cds_std::mutex >
+ cds::opt::lock_type< std::mutex >
>::type
{};
typedef cds::intrusive::SegmentedQueue< cds::gc::PTB, T, traits_SegmentedQueue_mutex_stat > SegmentedQueue_PTB_mutex_stat;
// Boost SList
- typedef details::BoostSList< T, cds_std::mutex > BoostSList_mutex;
+ typedef details::BoostSList< T, std::mutex > BoostSList_mutex;
typedef details::BoostSList< T, cds::lock::Spin > BoostSList_spin;
};
}
{};
struct traits_FCDeque_mutex:
public cds::container::fcdeque::make_traits<
- cds::opt::lock_type< cds_std::mutex >
+ cds::opt::lock_type< std::mutex >
>::type
{};
typedef StdQueue_deque<Value> StdQueue_deque_Spinlock;
typedef StdQueue_list<Value> StdQueue_list_Spinlock;
- typedef StdQueue_deque<Value, cds_std::mutex> StdQueue_deque_BoostMutex;
- typedef StdQueue_list<Value, cds_std::mutex> StdQueue_list_BoostMutex;
+ typedef StdQueue_deque<Value, std::mutex> StdQueue_deque_BoostMutex;
+ typedef StdQueue_list<Value, std::mutex> StdQueue_list_BoostMutex;
#ifdef UNIT_LOCK_WIN_CS
typedef StdQueue_deque<Value, lock::win::CS> StdQueue_deque_WinCS;
typedef StdQueue_list<Value, lock::win::CS> StdQueue_list_WinCS;
class traits_SegmentedQueue_mutex_stat:
public cds::container::segmented_queue::make_traits<
cds::opt::stat< cds::intrusive::segmented_queue::stat<> >
- ,cds::opt::lock_type< cds_std::mutex >
+ ,cds::opt::lock_type< std::mutex >
>::type
{};
class traits_SegmentedQueue_mutex:
public cds::container::segmented_queue::make_traits<
- cds::opt::lock_type< cds_std::mutex >
+ cds::opt::lock_type< std::mutex >
>::type
{};
#include <cds/gc/ptb.h>
#include <cds/gc/hrc.h>
-#include <cds/details/std/mutex.h>
+#include <mutex>
#include <cds/lock/spinlock.h>
#include <stack>
#include <list>
mutable Lock m_Lock;
cds::intrusive::treiber_stack::empty_stat m_stat;
- typedef cds_std::unique_lock<Lock> unique_lock;
+ typedef std::unique_lock<Lock> unique_lock;
public:
typedef T value_type;
struct traits_FCStack_mutex_stat:
public cds::intrusive::fcstack::make_traits<
cds::opt::stat< cds::intrusive::fcstack::stat<> >
- ,cds::opt::lock_type< cds_std::mutex >
+ ,cds::opt::lock_type< std::mutex >
>::type
{};
struct traits_FCStack_mutex_elimination:
public cds::intrusive::fcstack::make_traits<
cds::opt::enable_elimination< true >
- ,cds::opt::lock_type< cds_std::mutex >
+ ,cds::opt::lock_type< std::mutex >
>::type
{};
struct traits_FCStack_mutex_elimination_stat:
public cds::intrusive::fcstack::make_traits<
cds::opt::stat< cds::intrusive::fcstack::stat<> >
,cds::opt::enable_elimination< true >
- ,cds::opt::lock_type< cds_std::mutex >
+ ,cds::opt::lock_type< std::mutex >
>::type
{};
// std::stack
- typedef details::StdStack< T, std::stack< T* >, cds_std::mutex > StdStack_Deque_Mutex;
+ typedef details::StdStack< T, std::stack< T* >, std::mutex > StdStack_Deque_Mutex;
typedef details::StdStack< T, std::stack< T* >, cds::lock::Spin > StdStack_Deque_Spin;
- typedef details::StdStack< T, std::stack< T*, std::vector<T*> >, cds_std::mutex > StdStack_Vector_Mutex;
+ typedef details::StdStack< T, std::stack< T*, std::vector<T*> >, std::mutex > StdStack_Vector_Mutex;
typedef details::StdStack< T, std::stack< T*, std::vector<T*> >, cds::lock::Spin > StdStack_Vector_Spin;
- typedef details::StdStack< T, std::stack< T*, std::list<T*> >, cds_std::mutex > StdStack_List_Mutex;
+ typedef details::StdStack< T, std::stack< T*, std::list<T*> >, std::mutex > StdStack_List_Mutex;
typedef details::StdStack< T, std::stack< T*, std::list<T*> >, cds::lock::Spin > StdStack_List_Spin;
};
#include <cds/gc/ptb.h>
#include <cds/gc/hrc.h>
-#include <cds/details/std/mutex.h>
+#include <mutex>
#include <cds/lock/spinlock.h>
#include <stack>
#include <list>
mutable Lock m_Lock;
cds::container::treiber_stack::empty_stat m_stat;
- typedef cds_std::unique_lock<Lock> unique_lock;
+ typedef std::unique_lock<Lock> unique_lock;
public:
bool push( T const& v )
{};
struct traits_FCStack_mutex:
public cds::container::fcstack::make_traits<
- cds::opt::lock_type< cds_std::mutex >
+ cds::opt::lock_type< std::mutex >
>::type
{};
{};
struct traits_FCDeque_mutex:
public cds::container::fcdeque::make_traits<
- cds::opt::lock_type< cds_std::mutex >
+ cds::opt::lock_type< std::mutex >
>::type
{};
// std::stack
- typedef details::StdStack< T, std::stack< T >, cds_std::mutex > StdStack_Deque_Mutex;
+ typedef details::StdStack< T, std::stack< T >, std::mutex > StdStack_Deque_Mutex;
typedef details::StdStack< T, std::stack< T >, cds::lock::Spin > StdStack_Deque_Spin;
- typedef details::StdStack< T, std::stack< T, std::vector<T> >, cds_std::mutex > StdStack_Vector_Mutex;
+ typedef details::StdStack< T, std::stack< T, std::vector<T> >, std::mutex > StdStack_Vector_Mutex;
typedef details::StdStack< T, std::stack< T, std::vector<T> >, cds::lock::Spin > StdStack_Vector_Spin;
- typedef details::StdStack< T, std::stack< T, std::list<T> >, cds_std::mutex > StdStack_List_Mutex;
+ typedef details::StdStack< T, std::stack< T, std::list<T> >, std::mutex > StdStack_List_Mutex;
typedef details::StdStack< T, std::stack< T, std::list<T> >, cds::lock::Spin > StdStack_List_Spin;
};