25 #if FOLLY_X64 && !FOLLY_MOBILE && defined(__linux__) 26 #define FOLLY_USE_SYS_MEMBARRIER 1 27 #if !defined(__NR_membarrier) 28 #define __NR_membarrier 324 30 #if __has_include(<linux/membarrier.h>) 31 #include <linux/membarrier.h> 33 #define MEMBARRIER_CMD_QUERY 0 34 #define MEMBARRIER_CMD_SHARED 1 46 #if FOLLY_USE_SYS_MEMBARRIER 47 auto r = syscall(__NR_membarrier, MEMBARRIER_CMD_QUERY, 0);
52 return r & MEMBARRIER_CMD_SHARED;
59 #if FOLLY_USE_SYS_MEMBARRIER 60 return syscall(__NR_membarrier, MEMBARRIER_CMD_SHARED, 0);
—— Concurrent Priority Queue Implementation ——
bool sysMembarrierAvailable()