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

Unified Diff: runtime/vm/atomic.h

Issue 109803002: Profiler Take 2 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 | « runtime/tests/vm/vm.status ('k') | runtime/vm/atomic_android.cc » ('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/random.h b/runtime/vm/atomic.h
similarity index 50%
copy from runtime/vm/random.h
copy to runtime/vm/atomic.h
index c1c69d63efed579195a8314f3126327415c2526f..64defc02007a5c3eb1d4e8de08c14e236fc4c6e2 100644
--- a/runtime/vm/random.h
+++ b/runtime/vm/atomic.h
@@ -2,30 +2,21 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-#ifndef VM_RANDOM_H_
-#define VM_RANDOM_H_
+#ifndef VM_ATOMIC_H_
+#define VM_ATOMIC_H_
-#include "vm/globals.h"
#include "vm/allocation.h"
namespace dart {
-class Random : public ValueObject {
+class AtomicOperations : public AllStatic {
public:
- Random();
- ~Random();
-
- uint32_t NextUInt32();
-
- private:
- void NextState();
-
- uint64_t _state;
-
- DISALLOW_ALLOCATION();
- DISALLOW_COPY_AND_ASSIGN(Random);
+ // 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);
};
+
} // namespace dart
-#endif // VM_RANDOM_H_
+#endif // VM_ATOMIC_H_
« no previous file with comments | « runtime/tests/vm/vm.status ('k') | runtime/vm/atomic_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698