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

Unified Diff: runtime/vm/atomic.h

Issue 529823002: - Add AtomicOperations::CompareAndSwapWord (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | runtime/vm/atomic_android.h » ('j') | runtime/vm/object.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/atomic.h
===================================================================
--- runtime/vm/atomic.h (revision 39714)
+++ runtime/vm/atomic.h (working copy)
@@ -5,6 +5,8 @@
#ifndef VM_ATOMIC_H_
#define VM_ATOMIC_H_
+#include "platform/globals.h"
+
#include "vm/allocation.h"
namespace dart {
@@ -14,9 +16,23 @@
// Atomically fetch the value at p and increment the value at p.
// Returns the original value at p.
static uintptr_t FetchAndIncrement(uintptr_t* p);
+
+ static uword CompareAndSwapWord(uword* ptr, uword old_value, uword new_value);
};
} // namespace dart
+#if defined(TARGET_OS_ANDROID)
+#include "vm/atomic_android.h"
+#elif defined(TARGET_OS_LINUX)
+#include "vm/atomic_linux.h"
+#elif defined(TARGET_OS_MACOS)
+#include "vm/atomic_macos.h"
+#elif defined(TARGET_OS_WINDOWS)
+#include "vm/atomic_win.h"
+#else
+#error Unknown target os.
+#endif
+
#endif // VM_ATOMIC_H_
« no previous file with comments | « no previous file | runtime/vm/atomic_android.h » ('j') | runtime/vm/object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698