| Index: runtime/vm/atomic.h
|
| ===================================================================
|
| --- runtime/vm/atomic.h (revision 41327)
|
| +++ runtime/vm/atomic.h (working copy)
|
| @@ -8,6 +8,7 @@
|
| #include "platform/globals.h"
|
|
|
| #include "vm/allocation.h"
|
| +#include "vm/simulator.h"
|
|
|
| namespace dart {
|
|
|
| @@ -15,6 +16,9 @@
|
| public:
|
| // Atomically fetch the value at p and increment the value at p.
|
| // Returns the original value at p.
|
| + //
|
| + // 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 uword CompareAndSwapWord(uword* ptr, uword old_value, uword new_value);
|
| @@ -23,6 +27,10 @@
|
|
|
| } // namespace dart
|
|
|
| +// We need to use the simulator to ensure that atomic operations are observed
|
| +// both in C++ and in generated code if the simulator is active.
|
| +#include "vm/atomic_simulator.h"
|
| +
|
| #if defined(TARGET_OS_ANDROID)
|
| #include "vm/atomic_android.h"
|
| #elif defined(TARGET_OS_LINUX)
|
|
|