Opened 5 years ago
Last modified 5 years ago
#13130 new Bugs
BOOST_LOCKFREE_CACHELINE_BYTES value is incorrect on s390x
Reported by: | Owned by: | timblechmann | |
---|---|---|---|
Milestone: | To Be Determined | Component: | lockfree |
Version: | Boost 1.63.0 | Severity: | Optimization |
Keywords: | Cc: |
Description
The file include/boost/lockfree/detail/prefix.hpp contains the following code snippet:
// PowerPC caches support 128-byte cache lines. #if defined(powerpc) || defined(__powerpc__) || defined(__ppc__) #define BOOST_LOCKFREE_CACHELINE_BYTES 128 #else #define BOOST_LOCKFREE_CACHELINE_BYTES 64 #endif
This sets the cache line size on s390x to 64 bytes. This is incorrect, the correct size is 256 bytes. To fix we just need to add an extra #elif checking for the s390/ s390x compiler-defined macros.
Note:
See TracTickets
for help on using tickets.
Sorry, I messed up the formatting of the compiler-defined macros above, they are
__s390__
and__s390x__
.