| Index: runtime/vm/atomic_android.h
|
| ===================================================================
|
| --- runtime/vm/atomic_android.h (working copy)
|
| +++ runtime/vm/atomic_android.h (working copy)
|
| @@ -2,11 +2,17 @@
|
| // 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.
|
|
|
| -#include "platform/globals.h"
|
| -#if defined(TARGET_OS_ANDROID)
|
| +#ifndef VM_ATOMIC_ANDROID_H_
|
| +#define VM_ATOMIC_ANDROID_H_
|
|
|
| -#include "vm/atomic.h"
|
| +#if !defined VM_ATOMIC_H_
|
| +#error Do not include atomic_android.h directly. Use atomic.h instead.
|
| +#endif
|
|
|
| +#if !defined(TARGET_OS_ANDROID)
|
| +#error This file should only be included on Android builds.
|
| +#endif
|
| +
|
| namespace dart {
|
|
|
|
|
| @@ -15,6 +21,12 @@
|
| }
|
|
|
|
|
| +inline uword AtomicOperations::CompareAndSwapWord(uword* ptr,
|
| + uword old_value,
|
| + uword new_value) {
|
| + return __sync_val_compare_and_swap(ptr, old_value, new_value);
|
| +}
|
| +
|
| } // namespace dart
|
|
|
| -#endif // defined(TARGET_OS_ANDROID)
|
| +#endif // VM_ATOMIC_ANDROID_H_
|
|
|