Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1156)

Unified Diff: native_client_sdk/src/libraries/sdk_util/atomicops.h

Issue 19717004: [NaCl SDK] Add nacl_io and sdk_util namespaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad copyright in mount_mem Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_ */
« no previous file with comments | « native_client_sdk/src/libraries/ppapi_simple/ps_instance.h ('k') | native_client_sdk/src/libraries/sdk_util/auto_lock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698