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

Unified Diff: runtime/vm/atomic.h

Issue 1658983004: Change signature of atomic increment/decrement functions to return void. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 59a45ace74cc42b1d22c7bc6ee4aad92cb9542c5..bd489d0de36aec88030f1bc5edd88715e33db446 100644
--- a/runtime/vm/atomic.h
+++ b/runtime/vm/atomic.h
@@ -20,7 +20,12 @@ class AtomicOperations : public AllStatic {
// NOTE: Not to be used for any atomic operations involving memory locations
// that are accessed by generated code.
static uintptr_t FetchAndIncrement(uintptr_t* p);
- static uintptr_t FetchAndIncrementBy(intptr_t* p, intptr_t value);
+
+ // Atomically increment the value at p by 'value'.
+ //
+ // NOTE: Not to be used for any atomic operations involving memory locations
+ // that are accessed by generated code.
+ static void IncrementBy(intptr_t* p, intptr_t value);
// Atomically fetch the value at p and decrement the value at p.
// Returns the original value at p.
@@ -28,7 +33,12 @@ class AtomicOperations : public AllStatic {
// NOTE: Not to be used for any atomic operations involving memory locations
// that are accessed by generated code.
static uintptr_t FetchAndDecrement(uintptr_t* p);
- static uintptr_t FetchAndDecrementBy(intptr_t* p, intptr_t value);
+
+ // Atomically decrement the value at p by 'value'.
+ //
+ // NOTE: Not to be used for any atomic operations involving memory locations
+ // that are accessed by generated code.
+ static void DecrementBy(intptr_t* p, intptr_t value);
// Atomically compare *ptr to old_value, and if equal, store new_value.
// Returns the original value at ptr.
« 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