1 // Copyright (C) 2009, 2016 Tim Blechmann
3 // Distributed under the Boost Software License, Version 1.0. (See
4 // accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
7 #ifndef BOOST_LOCKFREE_PREFIX_HPP_INCLUDED
8 #define BOOST_LOCKFREE_PREFIX_HPP_INCLUDED
10 /* this file defines the following macros:
11 BOOST_LOCKFREE_CACHELINE_BYTES: size of a cache line
12 BOOST_LOCKFREE_PTR_COMPRESSION: use tag/pointer compression to utilize parts
13 of the virtual address space as tag (at least 16bit)
16 #if defined(__s390__) || defined(__s390x__)
17 #define BOOST_LOCKFREE_CACHELINE_BYTES 256
18 #elif defined(powerpc) || defined(__powerpc__) || defined(__ppc__)
19 #define BOOST_LOCKFREE_CACHELINE_BYTES 128
21 #define BOOST_LOCKFREE_CACHELINE_BYTES 64
24 #include <boost/predef.h>
26 #if BOOST_ARCH_X86_64 || ( (BOOST_ARCH_ARM >= BOOST_VERSION_NUMBER(8,0,0)) && !BOOST_PLAT_ANDROID )
27 #define BOOST_LOCKFREE_PTR_COMPRESSION 1
30 #endif /* BOOST_LOCKFREE_PREFIX_HPP_INCLUDED */