Chromium Code Reviews| Index: runtime/vm/atomic.h |
| diff --git a/runtime/vm/atomic.h b/runtime/vm/atomic.h |
| index 769aad67ae4106596dcac56018bc3282cbd7d78c..30bf94403ea0ec06fd65113902937c9877a46f09 100644 |
| --- a/runtime/vm/atomic.h |
| +++ b/runtime/vm/atomic.h |
| @@ -21,14 +21,14 @@ class AtomicOperations : public AllStatic { |
| // that are accessed by generated code |
| static uintptr_t FetchAndIncrement(uintptr_t* p); |
| - static intptr_t FetchAndAdd(intptr_t* p, intptr_t delta); |
| + static uintptr_t FetchAndDecrement(uintptr_t* p); |
|
Ivan Posva
2015/08/13 01:43:21
This also needs the comment from above. Especially
koda
2015/08/13 16:22:37
Done.
|
| static uword CompareAndSwapWord(uword* ptr, uword old_value, uword new_value); |
|
Ivan Posva
2015/08/13 01:43:21
Please add a comment here as well plus the NOTE th
koda
2015/08/13 16:22:37
Done.
|
| + // 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) { |
| - uword result; |
| - memcpy(&result, ptr, sizeof(result)); |
| - return result; |
| + return *static_cast<volatile uword*>(ptr); |
| } |
| }; |