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

Unified Diff: runtime/vm/atomic.h

Issue 1285923003: Use memcpy for Atomic::LoadRelaxed. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/atomic.h
diff --git a/runtime/vm/atomic.h b/runtime/vm/atomic.h
index 6197f16ab7b7a2ad3669bd37d18a5e63d8122ba6..769aad67ae4106596dcac56018bc3282cbd7d78c 100644
--- a/runtime/vm/atomic.h
+++ b/runtime/vm/atomic.h
@@ -25,7 +25,11 @@ class AtomicOperations : public AllStatic {
static uword CompareAndSwapWord(uword* ptr, uword old_value, uword new_value);
- static uword LoadRelaxed(uword* ptr);
+ static uword LoadRelaxed(uword* ptr) {
+ uword result;
+ memcpy(&result, ptr, sizeof(result));
+ return result;
+ }
};
« no previous file with comments | « no previous file | runtime/vm/atomic_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698