From e50a7bee807e1fc06117eb01912604a911227e73 Mon Sep 17 00:00:00 2001 From: Mike Krinkin Date: Fri, 17 Apr 2015 00:52:41 +0300 Subject: [PATCH] Relax memory order constraints. --- cds/intrusive/split_list.h | 2 +- cds/intrusive/split_list_nogc.h | 2 +- cds/intrusive/split_list_rcu.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 -- 2.34.1