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

Unified Diff: src/atomic-utils.h

Issue 1457483002: [profiler] Move away from UnboundedQueue to LockedQueue for regular events. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@locked-queue
Patch Set: Rebase Created 5 years, 1 month 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 | src/profiler/cpu-profiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/atomic-utils.h
diff --git a/src/atomic-utils.h b/src/atomic-utils.h
index 2aa78f8b5e22458fed9a9505b9f71f6e029f72e0..34e1cb0269ac37cce1392db05ffd578aae8340b4 100644
--- a/src/atomic-utils.h
+++ b/src/atomic-utils.h
@@ -19,9 +19,10 @@ class AtomicNumber {
AtomicNumber() : value_(0) {}
explicit AtomicNumber(T initial) : value_(initial) {}
- V8_INLINE void Increment(T increment) {
- base::Barrier_AtomicIncrement(&value_,
- static_cast<base::AtomicWord>(increment));
+ // Returns the newly set value.
+ V8_INLINE T Increment(T increment) {
+ return static_cast<T>(base::Barrier_AtomicIncrement(
+ &value_, static_cast<base::AtomicWord>(increment)));
}
V8_INLINE T Value() { return static_cast<T>(base::Acquire_Load(&value_)); }
« no previous file with comments | « no previous file | src/profiler/cpu-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698