From: khizmax Date: Sat, 29 Nov 2014 12:14:49 +0000 (+0300) Subject: Renaming cds/cxx11_atomic.h to cds/algo/atomic.h X-Git-Tag: v2.0.0~35 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6afa2a21efe16bd4685a652a8766abd92762de65;p=libcds.git Renaming cds/cxx11_atomic.h to cds/algo/atomic.h --- diff --git a/cds/algo/atomic.h b/cds/algo/atomic.h new file mode 100644 index 00000000..bc33866e --- /dev/null +++ b/cds/algo/atomic.h @@ -0,0 +1,319 @@ +//$$CDS-header$$ + +#ifndef __CDS_CXX11_ATOMIC_H +#define __CDS_CXX11_ATOMIC_H + +#include + +namespace cds { + +/// C++11 Atomic library support +/** + \p libcds can use the following implementations of the atomics: + - STL \p <atomic>. This is used by default + - \p boost.atomic for boost 1.54 and above. To use it you should define \p CDS_USE_BOOST_ATOMIC for + your compiler invocation, for example, for gcc specify \p -DCDS_USE_BOOST_ATOMIC + in command line + - \p libcds implementation of atomic operation according to C++11 standard as + specified in N3242, p.29. + \p libcds implementation is not the full standard compliant, it provides only C++ part of standard, + for example, \p libcds has no static initialization of the atomic variables and some other C features. + However, that imlementation is enough for the library purposes. Supported architecture: x86, amd64, + ia64 (Itanium) 64bit, 64bit Sparc. To use \p libcds atomic you should define \p CDS_USE_LIBCDS_ATOMIC + in the compiler command line (\p -DCDS_USE_LIBCDS_ATOMIC for gcc/clang). + + @note For Clang compiler \p libcds do not use compiler-provided \p <atomic> due some problems. + Instead, \p libcds atomic is used by default, or you can try to use \p boost.atomic. + + The library defines \p atomics alias for atomic namespace: + - namespace atomics = std for STL + - namespace atomics = boost for \p boost.atomic + - namespace atomics = cds::cxx11_atomic for library-provided atomic implementation +*/ +namespace cxx11_atomic { +}} // namespace cds::cxx11_atomic + +//@cond +#if defined(CDS_USE_BOOST_ATOMIC) + // boost atomic +# include +# if BOOST_VERSION >= 105400 +# include + namespace atomics = boost; +# define CDS_CXX11_ATOMIC_BEGIN_NAMESPACE namespace boost { +# define CDS_CXX11_ATOMIC_END_NAMESPACE } +# else +# error "Boost version 1.54 or above is needed for boost.atomic" +# endif +#elif defined(CDS_USE_LIBCDS_ATOMIC) + // libcds atomic +# include + namespace atomics = cds::cxx11_atomic; +# define CDS_CXX11_ATOMIC_BEGIN_NAMESPACE namespace cds { namespace cxx11_atomic { +# define CDS_CXX11_ATOMIC_END_NAMESPACE }} +#else + // Compiler provided C++11 atomic +# include + namespace atomics = std; +# define CDS_CXX11_ATOMIC_BEGIN_NAMESPACE namespace std { +# define CDS_CXX11_ATOMIC_END_NAMESPACE } +#endif +//@endcond + +namespace cds { + + /// Atomic primitives + /** + This namespace contains useful primitives derived from std::atomic. + */ + namespace atomicity { + + /// Atomic event counter. + /** + This class is based on std::atomic_size_t. + It uses relaxed memory ordering \p memory_order_relaxed and may be used as a statistic counter. + */ + class event_counter + { + //@cond + atomics::atomic_size_t m_counter; + //@endcond + + public: + typedef size_t value_type ; ///< Type of counter + + public: + // Initializes event counter with zero + event_counter() CDS_NOEXCEPT + : m_counter(size_t(0)) + {} + + /// Assign operator + /** + Returns \p n. + */ + value_type operator =( + value_type n //< new value of the counter + ) CDS_NOEXCEPT + { + m_counter.exchange( n, atomics::memory_order_relaxed ); + return n; + } + + /// Addition + /** + Returns new value of the atomic counter. + */ + size_t operator +=( + size_t n ///< addendum + ) CDS_NOEXCEPT + { + return m_counter.fetch_add( n, atomics::memory_order_relaxed ) + n; + } + + /// Substraction + /** + Returns new value of the atomic counter. + */ + size_t operator -=( + size_t n ///< subtrahend + ) CDS_NOEXCEPT + { + return m_counter.fetch_sub( n, atomics::memory_order_relaxed ) - n; + } + + /// Get current value of the counter + operator size_t () const CDS_NOEXCEPT + { + return m_counter.load( atomics::memory_order_relaxed ); + } + + /// Preincrement + size_t operator ++() CDS_NOEXCEPT + { + return m_counter.fetch_add( 1, atomics::memory_order_relaxed ) + 1; + } + /// Postincrement + size_t operator ++(int) CDS_NOEXCEPT + { + return m_counter.fetch_add( 1, atomics::memory_order_relaxed ); + } + + /// Predecrement + size_t operator --() CDS_NOEXCEPT + { + return m_counter.fetch_sub( 1, atomics::memory_order_relaxed ) - 1; + } + /// Postdecrement + size_t operator --(int) CDS_NOEXCEPT + { + return m_counter.fetch_sub( 1, atomics::memory_order_relaxed ); + } + + /// Get current value of the counter + size_t get() const CDS_NOEXCEPT + { + return m_counter.load( atomics::memory_order_relaxed ); + } + + /// Resets the counter to 0 + void reset() CDS_NOEXCEPT + { + m_counter.store( 0, atomics::memory_order_release ); + } + + }; + + /// Atomic item counter + /** + This class is simplified interface around std::atomic_size_t. + The class supports getting of current value of the counter and increment/decrement its value. + */ + class item_counter + { + public: + typedef atomics::atomic_size_t atomic_type ; ///< atomic type used + typedef size_t counter_type ; ///< Integral item counter type (size_t) + + private: + //@cond + atomic_type m_Counter ; ///< Atomic item counter + //@endcond + + public: + /// Default ctor initializes the counter to zero. + item_counter() + : m_Counter(counter_type(0)) + {} + + /// Returns current value of the counter + counter_type value(atomics::memory_order order = atomics::memory_order_relaxed) const + { + return m_Counter.load( order ); + } + + /// Same as \ref value() with relaxed memory ordering + operator counter_type() const + { + return value(); + } + + /// Returns underlying atomic interface + atomic_type& getAtomic() + { + return m_Counter; + } + + /// Returns underlying atomic interface (const) + const atomic_type& getAtomic() const + { + return m_Counter; + } + + /// Increments the counter. Semantics: postincrement + counter_type inc(atomics::memory_order order = atomics::memory_order_relaxed ) + { + return m_Counter.fetch_add( 1, order ); + } + + /// Decrements the counter. Semantics: postdecrement + counter_type dec(atomics::memory_order order = atomics::memory_order_relaxed) + { + return m_Counter.fetch_sub( 1, order ); + } + + /// Preincrement + counter_type operator ++() + { + return inc() + 1; + } + /// Postincrement + counter_type operator ++(int) + { + return inc(); + } + + /// Predecrement + counter_type operator --() + { + return dec() - 1; + } + /// Postdecrement + counter_type operator --(int) + { + return dec(); + } + + /// Resets count to 0 + void reset(atomics::memory_order order = atomics::memory_order_relaxed) + { + m_Counter.store( 0, order ); + } + }; + + /// Empty item counter + /** + This class may be used instead of \ref item_counter when you do not need full \ref item_counter interface. + All methods of the class is empty and returns 0. + + The object of this class should not be used in data structure that behavior significantly depends on item counting + (for example, in many hash map implementation). + */ + class empty_item_counter { + public: + typedef size_t counter_type ; ///< Counter type + public: + /// Returns 0 + counter_type value(atomics::memory_order /*order*/ = atomics::memory_order_relaxed) const + { + return 0; + } + + /// Same as \ref value(), always returns 0. + operator counter_type() const + { + return value(); + } + + /// Dummy increment. Always returns 0 + size_t inc(atomics::memory_order /*order*/ = atomics::memory_order_relaxed) + { + return 0; + } + + /// Dummy increment. Always returns 0 + size_t dec(atomics::memory_order /*order*/ = atomics::memory_order_relaxed) + { + return 0; + } + + /// Dummy pre-increment. Always returns 0 + size_t operator ++() + { + return 0; + } + /// Dummy post-increment. Always returns 0 + size_t operator ++(int) + { + return 0; + } + + /// Dummy pre-decrement. Always returns 0 + size_t operator --() + { + return 0; + } + /// Dummy post-decrement. Always returns 0 + size_t operator --(int) + { + return 0; + } + + /// Dummy function + void reset(atomics::memory_order /*order*/ = atomics::memory_order_relaxed) + {} + }; + } // namespace atomicity +} // namespace cds + +#endif // #ifndef __CDS_CXX11_ATOMIC_H diff --git a/cds/algo/elimination.h b/cds/algo/elimination.h index e85207b6..67e071ba 100644 --- a/cds/algo/elimination.h +++ b/cds/algo/elimination.h @@ -5,7 +5,7 @@ #include #include -#include +#include #include namespace cds { namespace algo { diff --git a/cds/algo/flat_combining.h b/cds/algo/flat_combining.h index 486fe724..19fc20bd 100644 --- a/cds/algo/flat_combining.h +++ b/cds/algo/flat_combining.h @@ -4,7 +4,7 @@ #define __CDS_ALGO_FLAT_COMBINING_H #include -#include +#include #include #include #include diff --git a/cds/container/vyukov_mpmc_cycle_queue.h b/cds/container/vyukov_mpmc_cycle_queue.h index b6fc3efa..94f2c674 100644 --- a/cds/container/vyukov_mpmc_cycle_queue.h +++ b/cds/container/vyukov_mpmc_cycle_queue.h @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include namespace cds { namespace container { diff --git a/cds/cxx11_atomic.h b/cds/cxx11_atomic.h deleted file mode 100644 index bc33866e..00000000 --- a/cds/cxx11_atomic.h +++ /dev/null @@ -1,319 +0,0 @@ -//$$CDS-header$$ - -#ifndef __CDS_CXX11_ATOMIC_H -#define __CDS_CXX11_ATOMIC_H - -#include - -namespace cds { - -/// C++11 Atomic library support -/** - \p libcds can use the following implementations of the atomics: - - STL \p <atomic>. This is used by default - - \p boost.atomic for boost 1.54 and above. To use it you should define \p CDS_USE_BOOST_ATOMIC for - your compiler invocation, for example, for gcc specify \p -DCDS_USE_BOOST_ATOMIC - in command line - - \p libcds implementation of atomic operation according to C++11 standard as - specified in N3242, p.29. - \p libcds implementation is not the full standard compliant, it provides only C++ part of standard, - for example, \p libcds has no static initialization of the atomic variables and some other C features. - However, that imlementation is enough for the library purposes. Supported architecture: x86, amd64, - ia64 (Itanium) 64bit, 64bit Sparc. To use \p libcds atomic you should define \p CDS_USE_LIBCDS_ATOMIC - in the compiler command line (\p -DCDS_USE_LIBCDS_ATOMIC for gcc/clang). - - @note For Clang compiler \p libcds do not use compiler-provided \p <atomic> due some problems. - Instead, \p libcds atomic is used by default, or you can try to use \p boost.atomic. - - The library defines \p atomics alias for atomic namespace: - - namespace atomics = std for STL - - namespace atomics = boost for \p boost.atomic - - namespace atomics = cds::cxx11_atomic for library-provided atomic implementation -*/ -namespace cxx11_atomic { -}} // namespace cds::cxx11_atomic - -//@cond -#if defined(CDS_USE_BOOST_ATOMIC) - // boost atomic -# include -# if BOOST_VERSION >= 105400 -# include - namespace atomics = boost; -# define CDS_CXX11_ATOMIC_BEGIN_NAMESPACE namespace boost { -# define CDS_CXX11_ATOMIC_END_NAMESPACE } -# else -# error "Boost version 1.54 or above is needed for boost.atomic" -# endif -#elif defined(CDS_USE_LIBCDS_ATOMIC) - // libcds atomic -# include - namespace atomics = cds::cxx11_atomic; -# define CDS_CXX11_ATOMIC_BEGIN_NAMESPACE namespace cds { namespace cxx11_atomic { -# define CDS_CXX11_ATOMIC_END_NAMESPACE }} -#else - // Compiler provided C++11 atomic -# include - namespace atomics = std; -# define CDS_CXX11_ATOMIC_BEGIN_NAMESPACE namespace std { -# define CDS_CXX11_ATOMIC_END_NAMESPACE } -#endif -//@endcond - -namespace cds { - - /// Atomic primitives - /** - This namespace contains useful primitives derived from std::atomic. - */ - namespace atomicity { - - /// Atomic event counter. - /** - This class is based on std::atomic_size_t. - It uses relaxed memory ordering \p memory_order_relaxed and may be used as a statistic counter. - */ - class event_counter - { - //@cond - atomics::atomic_size_t m_counter; - //@endcond - - public: - typedef size_t value_type ; ///< Type of counter - - public: - // Initializes event counter with zero - event_counter() CDS_NOEXCEPT - : m_counter(size_t(0)) - {} - - /// Assign operator - /** - Returns \p n. - */ - value_type operator =( - value_type n //< new value of the counter - ) CDS_NOEXCEPT - { - m_counter.exchange( n, atomics::memory_order_relaxed ); - return n; - } - - /// Addition - /** - Returns new value of the atomic counter. - */ - size_t operator +=( - size_t n ///< addendum - ) CDS_NOEXCEPT - { - return m_counter.fetch_add( n, atomics::memory_order_relaxed ) + n; - } - - /// Substraction - /** - Returns new value of the atomic counter. - */ - size_t operator -=( - size_t n ///< subtrahend - ) CDS_NOEXCEPT - { - return m_counter.fetch_sub( n, atomics::memory_order_relaxed ) - n; - } - - /// Get current value of the counter - operator size_t () const CDS_NOEXCEPT - { - return m_counter.load( atomics::memory_order_relaxed ); - } - - /// Preincrement - size_t operator ++() CDS_NOEXCEPT - { - return m_counter.fetch_add( 1, atomics::memory_order_relaxed ) + 1; - } - /// Postincrement - size_t operator ++(int) CDS_NOEXCEPT - { - return m_counter.fetch_add( 1, atomics::memory_order_relaxed ); - } - - /// Predecrement - size_t operator --() CDS_NOEXCEPT - { - return m_counter.fetch_sub( 1, atomics::memory_order_relaxed ) - 1; - } - /// Postdecrement - size_t operator --(int) CDS_NOEXCEPT - { - return m_counter.fetch_sub( 1, atomics::memory_order_relaxed ); - } - - /// Get current value of the counter - size_t get() const CDS_NOEXCEPT - { - return m_counter.load( atomics::memory_order_relaxed ); - } - - /// Resets the counter to 0 - void reset() CDS_NOEXCEPT - { - m_counter.store( 0, atomics::memory_order_release ); - } - - }; - - /// Atomic item counter - /** - This class is simplified interface around std::atomic_size_t. - The class supports getting of current value of the counter and increment/decrement its value. - */ - class item_counter - { - public: - typedef atomics::atomic_size_t atomic_type ; ///< atomic type used - typedef size_t counter_type ; ///< Integral item counter type (size_t) - - private: - //@cond - atomic_type m_Counter ; ///< Atomic item counter - //@endcond - - public: - /// Default ctor initializes the counter to zero. - item_counter() - : m_Counter(counter_type(0)) - {} - - /// Returns current value of the counter - counter_type value(atomics::memory_order order = atomics::memory_order_relaxed) const - { - return m_Counter.load( order ); - } - - /// Same as \ref value() with relaxed memory ordering - operator counter_type() const - { - return value(); - } - - /// Returns underlying atomic interface - atomic_type& getAtomic() - { - return m_Counter; - } - - /// Returns underlying atomic interface (const) - const atomic_type& getAtomic() const - { - return m_Counter; - } - - /// Increments the counter. Semantics: postincrement - counter_type inc(atomics::memory_order order = atomics::memory_order_relaxed ) - { - return m_Counter.fetch_add( 1, order ); - } - - /// Decrements the counter. Semantics: postdecrement - counter_type dec(atomics::memory_order order = atomics::memory_order_relaxed) - { - return m_Counter.fetch_sub( 1, order ); - } - - /// Preincrement - counter_type operator ++() - { - return inc() + 1; - } - /// Postincrement - counter_type operator ++(int) - { - return inc(); - } - - /// Predecrement - counter_type operator --() - { - return dec() - 1; - } - /// Postdecrement - counter_type operator --(int) - { - return dec(); - } - - /// Resets count to 0 - void reset(atomics::memory_order order = atomics::memory_order_relaxed) - { - m_Counter.store( 0, order ); - } - }; - - /// Empty item counter - /** - This class may be used instead of \ref item_counter when you do not need full \ref item_counter interface. - All methods of the class is empty and returns 0. - - The object of this class should not be used in data structure that behavior significantly depends on item counting - (for example, in many hash map implementation). - */ - class empty_item_counter { - public: - typedef size_t counter_type ; ///< Counter type - public: - /// Returns 0 - counter_type value(atomics::memory_order /*order*/ = atomics::memory_order_relaxed) const - { - return 0; - } - - /// Same as \ref value(), always returns 0. - operator counter_type() const - { - return value(); - } - - /// Dummy increment. Always returns 0 - size_t inc(atomics::memory_order /*order*/ = atomics::memory_order_relaxed) - { - return 0; - } - - /// Dummy increment. Always returns 0 - size_t dec(atomics::memory_order /*order*/ = atomics::memory_order_relaxed) - { - return 0; - } - - /// Dummy pre-increment. Always returns 0 - size_t operator ++() - { - return 0; - } - /// Dummy post-increment. Always returns 0 - size_t operator ++(int) - { - return 0; - } - - /// Dummy pre-decrement. Always returns 0 - size_t operator --() - { - return 0; - } - /// Dummy post-decrement. Always returns 0 - size_t operator --(int) - { - return 0; - } - - /// Dummy function - void reset(atomics::memory_order /*order*/ = atomics::memory_order_relaxed) - {} - }; - } // namespace atomicity -} // namespace cds - -#endif // #ifndef __CDS_CXX11_ATOMIC_H diff --git a/cds/details/marked_ptr.h b/cds/details/marked_ptr.h index 9471d67a..040bcb99 100644 --- a/cds/details/marked_ptr.h +++ b/cds/details/marked_ptr.h @@ -3,7 +3,7 @@ #ifndef __CDS_DETAILS_MARKED_PTR_H #define __CDS_DETAILS_MARKED_PTR_H -#include +#include namespace cds { namespace details { diff --git a/cds/gc/details/dhp.h b/cds/gc/details/dhp.h index 8f177c37..7c918bae 100644 --- a/cds/gc/details/dhp.h +++ b/cds/gc/details/dhp.h @@ -4,7 +4,7 @@ #define __CDS_GC_DETAILS_DHP_H #include // unique_lock -#include +#include #include #include #include diff --git a/cds/gc/details/hp.h b/cds/gc/details/hp.h index c58192d9..70d71da2 100644 --- a/cds/gc/details/hp.h +++ b/cds/gc/details/hp.h @@ -3,7 +3,7 @@ #ifndef __CDS_GC_DETAILS_HP_H #define __CDS_GC_DETAILS_HP_H -#include +#include #include #include diff --git a/cds/gc/details/hp_alloc.h b/cds/gc/details/hp_alloc.h index ae0ac409..2fe84bae 100644 --- a/cds/gc/details/hp_alloc.h +++ b/cds/gc/details/hp_alloc.h @@ -3,7 +3,7 @@ #ifndef __CDS_GC_DETAILS_HP_ALLOC_H #define __CDS_GC_DETAILS_HP_ALLOC_H -#include +#include #include #include diff --git a/cds/intrusive/details/michael_list_base.h b/cds/intrusive/details/michael_list_base.h index 023714a3..68428904 100644 --- a/cds/intrusive/details/michael_list_base.h +++ b/cds/intrusive/details/michael_list_base.h @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include diff --git a/cds/intrusive/details/michael_set_base.h b/cds/intrusive/details/michael_set_base.h index 79f3549b..757d05e3 100644 --- a/cds/intrusive/details/michael_set_base.h +++ b/cds/intrusive/details/michael_set_base.h @@ -7,7 +7,7 @@ #include #include #include -#include +#include namespace cds { namespace intrusive { diff --git a/cds/intrusive/details/single_link_struct.h b/cds/intrusive/details/single_link_struct.h index b783cc06..5a2758e0 100644 --- a/cds/intrusive/details/single_link_struct.h +++ b/cds/intrusive/details/single_link_struct.h @@ -5,7 +5,7 @@ #include #include -#include +#include namespace cds { namespace intrusive { diff --git a/cds/intrusive/details/split_list_base.h b/cds/intrusive/details/split_list_base.h index 744ee934..758e352e 100644 --- a/cds/intrusive/details/split_list_base.h +++ b/cds/intrusive/details/split_list_base.h @@ -4,7 +4,7 @@ #define __CDS_INTRUSIVE_DETAILS_SPLIT_LIST_BASE_H #include -#include +#include #include #include #include diff --git a/cds/intrusive/msqueue.h b/cds/intrusive/msqueue.h index c0c363ef..2fad6f96 100644 --- a/cds/intrusive/msqueue.h +++ b/cds/intrusive/msqueue.h @@ -5,7 +5,7 @@ #include #include -#include +#include namespace cds { namespace intrusive { diff --git a/cds/intrusive/optimistic_queue.h b/cds/intrusive/optimistic_queue.h index 5009efac..f2b42543 100644 --- a/cds/intrusive/optimistic_queue.h +++ b/cds/intrusive/optimistic_queue.h @@ -5,7 +5,7 @@ #include #include -#include +#include #include namespace cds { namespace intrusive { diff --git a/cds/intrusive/tsigas_cycle_queue.h b/cds/intrusive/tsigas_cycle_queue.h index 20981f75..202feb12 100644 --- a/cds/intrusive/tsigas_cycle_queue.h +++ b/cds/intrusive/tsigas_cycle_queue.h @@ -4,7 +4,7 @@ #define __CDS_INTRUSIVE_TSIGAS_CYCLE_QUEUE_H #include -#include +#include #include #include diff --git a/cds/lock/spinlock.h b/cds/lock/spinlock.h index dbe729db..80460a82 100644 --- a/cds/lock/spinlock.h +++ b/cds/lock/spinlock.h @@ -12,7 +12,7 @@ 2006 khizmax Created */ -#include +#include #include #include diff --git a/cds/memory/michael/osalloc_stat.h b/cds/memory/michael/osalloc_stat.h index 52d861ec..2a842e10 100644 --- a/cds/memory/michael/osalloc_stat.h +++ b/cds/memory/michael/osalloc_stat.h @@ -3,7 +3,7 @@ #ifndef __CDS_MEMORY_MICHAEL_ALLOCATOR_OSALLOC_STAT_H #define __CDS_MEMORY_MICHAEL_ALLOCATOR_OSALLOC_STAT_H -#include +#include namespace cds { namespace memory { namespace michael { diff --git a/cds/memory/michael/procheap_stat.h b/cds/memory/michael/procheap_stat.h index 1200a892..308cad96 100644 --- a/cds/memory/michael/procheap_stat.h +++ b/cds/memory/michael/procheap_stat.h @@ -3,7 +3,7 @@ #ifndef __CDS_MEMORY_MICHAEL_ALLOCATOR_PROCHEAP_STAT_H #define __CDS_MEMORY_MICHAEL_ALLOCATOR_PROCHEAP_STAT_H -#include +#include namespace cds { namespace memory { namespace michael { diff --git a/cds/opt/options.h b/cds/opt/options.h index 0c2f7e95..7b9c3d85 100644 --- a/cds/opt/options.h +++ b/cds/opt/options.h @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include // rand, srand namespace cds { diff --git a/cds/refcounter.h b/cds/refcounter.h index 3ccdfce2..69ca30a0 100644 --- a/cds/refcounter.h +++ b/cds/refcounter.h @@ -9,7 +9,7 @@ Editions: */ -#include +#include namespace cds { diff --git a/cds/urcu/details/base.h b/cds/urcu/details/base.h index 5795d2d2..b008581d 100644 --- a/cds/urcu/details/base.h +++ b/cds/urcu/details/base.h @@ -3,7 +3,7 @@ #ifndef _CDS_URCU_DETAILS_BASE_H #define _CDS_URCU_DETAILS_BASE_H -#include +#include #include #include #include diff --git a/projects/Win/vc12/cds.vcxproj b/projects/Win/vc12/cds.vcxproj index 8ec88bc1..36061e79 100644 --- a/projects/Win/vc12/cds.vcxproj +++ b/projects/Win/vc12/cds.vcxproj @@ -631,6 +631,7 @@ + @@ -728,7 +729,6 @@ - diff --git a/projects/Win/vc12/cds.vcxproj.filters b/projects/Win/vc12/cds.vcxproj.filters index cbe94f2b..e2373d1a 100644 --- a/projects/Win/vc12/cds.vcxproj.filters +++ b/projects/Win/vc12/cds.vcxproj.filters @@ -632,9 +632,6 @@ Header Files\cds\compiler\gcc\x86 - - Header Files\cds - Header Files\cds\compiler\gcc\sparc @@ -1166,5 +1163,8 @@ Header Files\cds\gc\impl + + Header Files\cds\algo + \ No newline at end of file diff --git a/projects/Win/vc14/cds.vcxproj b/projects/Win/vc14/cds.vcxproj index 7ea67a34..4cfec11a 100644 --- a/projects/Win/vc14/cds.vcxproj +++ b/projects/Win/vc14/cds.vcxproj @@ -630,6 +630,7 @@ + @@ -727,7 +728,6 @@ - diff --git a/projects/Win/vc14/cds.vcxproj.filters b/projects/Win/vc14/cds.vcxproj.filters index cbe94f2b..e2373d1a 100644 --- a/projects/Win/vc14/cds.vcxproj.filters +++ b/projects/Win/vc14/cds.vcxproj.filters @@ -632,9 +632,6 @@ Header Files\cds\compiler\gcc\x86 - - Header Files\cds - Header Files\cds\compiler\gcc\sparc @@ -1166,5 +1163,8 @@ Header Files\cds\gc\impl + + Header Files\cds\algo + \ No newline at end of file diff --git a/src/init.cpp b/src/init.cpp index 4ca8614e..40243613 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1,7 +1,7 @@ //$$CDS-header$$ #include -#include +#include #if CDS_OS_INTERFACE == CDS_OSI_WINDOWS # if CDS_COMPILER == CDS_COMPILER_MSVC || CDS_COMPILER == CDS_COMPILER_INTEL diff --git a/src/topology_hpux.cpp b/src/topology_hpux.cpp index cc73f979..60a63d33 100644 --- a/src/topology_hpux.cpp +++ b/src/topology_hpux.cpp @@ -4,7 +4,7 @@ #if CDS_OS_TYPE == CDS_OS_HPUX -#include +#include #include namespace cds { namespace OS { CDS_CXX11_INLINE_NAMESPACE namespace Hpux { diff --git a/tests/cppunit/cppunit_proxy.h b/tests/cppunit/cppunit_proxy.h index 09b02c13..a39cea4e 100644 --- a/tests/cppunit/cppunit_proxy.h +++ b/tests/cppunit/cppunit_proxy.h @@ -29,6 +29,6 @@ #endif #include "cppunit/cppunit_mini.h" -#include // for cds::atomicity::empty_item_counter +#include // for cds::atomicity::empty_item_counter #endif diff --git a/tests/cppunit/test_beans.h b/tests/cppunit/test_beans.h index f5be0f9e..ae3e4864 100644 --- a/tests/cppunit/test_beans.h +++ b/tests/cppunit/test_beans.h @@ -7,7 +7,7 @@ namespace cds { } // Including this header is a bad thing for header testing. How to avoid it?.. -#include // for cds::atomicity::empty_item_counter +#include // for cds::atomicity::empty_item_counter namespace test_beans { template diff --git a/tests/cppunit/thread.h b/tests/cppunit/thread.h index 68a02be9..468050dc 100644 --- a/tests/cppunit/thread.h +++ b/tests/cppunit/thread.h @@ -8,7 +8,7 @@ #include #include #include // for attach/detach thread -#include +#include namespace CppUnitMini { static inline unsigned int Rand( unsigned int nMax ) diff --git a/tests/test-hdr/misc/cxx11_atomic_class.cpp b/tests/test-hdr/misc/cxx11_atomic_class.cpp index cafd6a62..59319192 100644 --- a/tests/test-hdr/misc/cxx11_atomic_class.cpp +++ b/tests/test-hdr/misc/cxx11_atomic_class.cpp @@ -3,7 +3,7 @@ #include "cppunit/cppunit_proxy.h" //#define CDS_USE_BOOST_ATOMIC -#include +#include #include "misc/cxx11_convert_memory_order.h" diff --git a/tests/test-hdr/misc/cxx11_atomic_func.cpp b/tests/test-hdr/misc/cxx11_atomic_func.cpp index d5f7f2f9..e16a63d0 100644 --- a/tests/test-hdr/misc/cxx11_atomic_func.cpp +++ b/tests/test-hdr/misc/cxx11_atomic_func.cpp @@ -2,7 +2,7 @@ #include "cppunit/cppunit_proxy.h" -#include +#include #ifndef CDS_USE_BOOST_ATOMIC // Skip this test for boost.atomic diff --git a/tests/test-hdr/misc/cxx11_convert_memory_order.h b/tests/test-hdr/misc/cxx11_convert_memory_order.h index a9dfc243..ca548ef4 100644 --- a/tests/test-hdr/misc/cxx11_convert_memory_order.h +++ b/tests/test-hdr/misc/cxx11_convert_memory_order.h @@ -1,6 +1,6 @@ //$$CDS-header$$ -// This header should be included AFTER if needed +// This header should be included AFTER if needed namespace misc { diff --git a/tests/test-hdr/size_check.h b/tests/test-hdr/size_check.h index 912b2d45..8b507bf2 100644 --- a/tests/test-hdr/size_check.h +++ b/tests/test-hdr/size_check.h @@ -3,7 +3,7 @@ #ifndef __CDSTEST_SIZE_CHECK_H #define __CDSTEST_SIZE_CHECK_H -#include +#include namespace misc {