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

Unified Diff: runtime/vm/atomic.h

Issue 2252533002: Fix race in GC sweeper and isolate reload rollback. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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/isolate.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 b6e5f280001ae5f61fa3c8e10d339f9a91de478d..d6a833bb313b61e5fe8a3c548e89eeef1ba02cfc 100644
--- a/runtime/vm/atomic.h
+++ b/runtime/vm/atomic.h
@@ -51,14 +51,9 @@ class AtomicOperations : public AllStatic {
// Performs a load of a word from 'ptr', but without any guarantees about
// memory order (i.e., no load barriers/fences).
- static uword LoadRelaxed(uword* ptr) {
- return *static_cast<volatile uword*>(ptr);
- }
-
- // Performs a load of a word from 'ptr', but without any guarantees about
- // memory order (i.e., no load barriers/fences).
- static intptr_t LoadRelaxedIntPtr(intptr_t* ptr) {
- return *static_cast<volatile intptr_t*>(ptr);
+ template <typename T>
+ static T LoadRelaxed(T* ptr) {
+ return *static_cast<volatile T*>(ptr);
}
};
« no previous file with comments | « no previous file | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698