From: Mike Krinkin Date: Thu, 16 Apr 2015 21:52:41 +0000 (+0300) Subject: Relax memory order constraints. X-Git-Tag: v2.1.0~249^2~5^2 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=e50a7bee807e1fc06117eb01912604a911227e73;p=libcds.git Relax memory order constraints. --- diff --git a/cds/intrusive/split_list.h b/cds/intrusive/split_list.h index 2d78c141..0288e703 100644 --- a/cds/intrusive/split_list.h +++ b/cds/intrusive/split_list.h @@ -480,7 +480,7 @@ namespace cds { namespace intrusive { : std::numeric_limits::max(); m_nMaxItemCount.compare_exchange_strong( nMaxCount, nNewMaxCount, memory_model::memory_order_relaxed, memory_model::memory_order_relaxed ); - m_nBucketCountLog2.compare_exchange_strong( sz, sz + 1, memory_model::memory_order_seq_cst, memory_model::memory_order_relaxed ); + m_nBucketCountLog2.compare_exchange_strong( sz, sz + 1, memory_model::memory_order_relaxed, memory_model::memory_order_relaxed ); } template diff --git a/cds/intrusive/split_list_nogc.h b/cds/intrusive/split_list_nogc.h index 5ae837c8..5bf894ba 100644 --- a/cds/intrusive/split_list_nogc.h +++ b/cds/intrusive/split_list_nogc.h @@ -277,7 +277,7 @@ namespace cds { namespace intrusive { : std::numeric_limits::max(); m_nMaxItemCount.compare_exchange_strong( nMaxCount, nNewMaxCount, memory_model::memory_order_relaxed, memory_model::memory_order_relaxed ); - m_nBucketCountLog2.compare_exchange_strong( sz, sz + 1, memory_model::memory_order_seq_cst, memory_model::memory_order_relaxed ); + m_nBucketCountLog2.compare_exchange_strong( sz, sz + 1, memory_model::memory_order_relaxed, memory_model::memory_order_relaxed ); } //@endcond diff --git a/cds/intrusive/split_list_rcu.h b/cds/intrusive/split_list_rcu.h index f83bd7d2..8deeb7ce 100644 --- a/cds/intrusive/split_list_rcu.h +++ b/cds/intrusive/split_list_rcu.h @@ -373,7 +373,7 @@ namespace cds { namespace intrusive { : std::numeric_limits::max(); m_nMaxItemCount.compare_exchange_strong( nMaxCount, nNewMaxCount, memory_model::memory_order_relaxed, memory_model::memory_order_relaxed ); - m_nBucketCountLog2.compare_exchange_strong( sz, sz + 1, memory_model::memory_order_seq_cst, memory_model::memory_order_relaxed ); + m_nBucketCountLog2.compare_exchange_strong( sz, sz + 1, memory_model::memory_order_relaxed, memory_model::memory_order_relaxed ); } template