X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=blobdiff_plain;f=folly%2Fportability%2FSysMembarrier.cpp;h=9b3735c965603e8cbfa985aa7f4566522191b820;hp=9a3d307390a9445818b0ca991c468a6b9fc76c92;hb=ef20f6380813110434dae416f0abe964e476c8c6;hpb=18aab9241fad1238171b1d849f7765ec6100c593 diff --git a/folly/portability/SysMembarrier.cpp b/folly/portability/SysMembarrier.cpp index 9a3d3073..9b3735c9 100644 --- a/folly/portability/SysMembarrier.cpp +++ b/folly/portability/SysMembarrier.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2016 Facebook, Inc. + * Copyright 2017 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +26,10 @@ #define FOLLY_USE_SYS_MEMBARRIER 1 #if !defined(__NR_membarrier) #define __NR_membarrier 324 +#endif +#if FOLLY_HAVE_LINUX_MEMBARRIER_H +#include // @manual +#else #define MEMBARRIER_CMD_QUERY 0 #define MEMBARRIER_CMD_SHARED 1 #endif @@ -58,5 +62,5 @@ int sysMembarrier() { return -1; #endif } -} -} +} // namespace detail +} // namespace folly