Index: native_client_sdk/src/libraries/sdk_util/atomicops.h |
diff --git a/native_client_sdk/src/libraries/sdk_util/atomicops.h b/native_client_sdk/src/libraries/sdk_util/atomicops.h |
index cd07b4411868fb9c15694db614be7777f16c9151..b0e9431b4f4a851d5283a0dd35b5422996c6f136 100644 |
--- a/native_client_sdk/src/libraries/sdk_util/atomicops.h |
+++ b/native_client_sdk/src/libraries/sdk_util/atomicops.h |
@@ -9,6 +9,9 @@ |
#ifndef WIN32 |
#include <stdint.h> |
+ |
+namespace sdk_util { |
+ |
typedef int32_t Atomic32; |
#ifndef __llvm__ |
@@ -39,7 +42,9 @@ inline Atomic32 AtomicXorFetch(volatile Atomic32* ptr, Atomic32 value) { |
return __sync_xor_and_fetch(ptr, value); |
} |
-#else |
+} // namespace sdk_util |
+ |
+#else // ifndef WIN32 |
#include <windows.h> |
@@ -49,6 +54,8 @@ inline Atomic32 AtomicXorFetch(volatile Atomic32* ptr, Atomic32 value) { |
#undef PostMessage |
#undef interface |
+namespace sdk_util { |
+ |
typedef long Atomic32; |
/* Windows.h already defines a MemoryBarrier macro. */ |
@@ -96,7 +103,8 @@ inline Atomic32 AtomicXorFetch(volatile Atomic32* ptr, Atomic32 value) { |
return newval; |
} |
-#endif |
+} // namespace sdk_util |
+#endif // ifndef WIN32 |
#endif /* LIBRARIES_SDK_UTIL_ATOMICOPS_H_ */ |