From dbc87a8a5ef0797edc4982513335af6f0f51b0b7 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Thu, 22 Mar 2018 19:20:32 +0300 Subject: [PATCH] mdbx: refine MDBX_CACHE_IS_COHERENT. --- src/osal.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/osal.h b/src/osal.h index 2b14fc29..5706b77a 100644 --- a/src/osal.h +++ b/src/osal.h @@ -334,17 +334,14 @@ static __inline void mdbx_memory_barrier(void) { /*----------------------------------------------------------------------------*/ /* Cache coherence and invalidation */ -#if defined(__i386__) || defined(__x86_64__) || defined(_M_AMD64) || \ - defined(_M_IX86) || defined(__i386) || defined(__amd64) || \ - defined(i386) || defined(__x86_64) || defined(_AMD64_) || defined(_M_X64) -#define MDBX_CACHE_IS_COHERENT 1 -#elif defined(__hppa) || defined(__hppa__) -#define MDBX_CACHE_IS_COHERENT 1 -#endif - #ifndef MDBX_CACHE_IS_COHERENT +#if defined(__ia32__) || defined(__e2k__) || defined(__hppa) || \ + defined(__hppa__) +#define MDBX_CACHE_IS_COHERENT 1 +#else #define MDBX_CACHE_IS_COHERENT 0 #endif +#endif /* MDBX_CACHE_IS_COHERENT */ #ifndef MDBX_CACHELINE_SIZE #if defined(SYSTEM_CACHE_ALIGNMENT_SIZE)