Commit 7dd33144 authored by Michael Lee's avatar Michael Lee Committed by Facebook Github Bot 4

Fix macro check in SysMembarrier

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
parent 06064ddf
......@@ -21,7 +21,7 @@
#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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment