Summary:
FOLLY_X64 is usually defined, so check whehter it is defined
to 0 or 1. In addition, memory barriers are not necessarily widely
available on the mobile platforms. What leads me to believe this is
that, at least for older ndk's, atomics are not guaranteed to work for
multicore platforms.
Reviewed By: andriigrynenko
Differential Revision:
D3586806
fbshipit-source-id:
3ac8c4b74cac09e41bc3cb65c8adc2732b8b2256
#include <folly/Portability.h>
#include <folly/portability/Unistd.h>
-#if !defined(__NR_membarrier) && defined(FOLLY_X64)
+#if !defined(__NR_membarrier) && FOLLY_X64 && !FOLLY_MOBILE
#define __NR_membarrier 324
#define MEMBARRIER_CMD_QUERY 0
#define MEMBARRIER_CMD_SHARED 1