mirror of
https://github.com/boostorg/atomic.git
synced 2026-01-19 04:02:09 +00:00
Added cache line sizes for PowerPC and IBM Z.
The cache line sizes were taken from Boost.Lockfree.
This commit is contained in:
@@ -42,9 +42,15 @@ namespace detail {
|
||||
|
||||
namespace {
|
||||
|
||||
// This seems to be the maximum across all modern CPUs
|
||||
// Cache line size, in bytes
|
||||
// NOTE: This constant is made as a macro because some compilers (gcc 4.4 for one) don't allow enums or namespace scope constants in alignment attributes
|
||||
#if defined(__s390__) || defined(__s390x__)
|
||||
#define BOOST_ATOMIC_CACHE_LINE_SIZE 256
|
||||
#elif defined(powerpc) || defined(__powerpc__) || defined(__ppc__)
|
||||
#define BOOST_ATOMIC_CACHE_LINE_SIZE 128
|
||||
#else
|
||||
#define BOOST_ATOMIC_CACHE_LINE_SIZE 64
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_ATOMIC_USE_PTHREAD)
|
||||
typedef pthread_mutex_t lock_type;
|
||||
|
||||
Reference in New Issue
Block a user