| Index: runtime/vm/atomic_fuchsia.h
|
| diff --git a/runtime/vm/atomic_android.h b/runtime/vm/atomic_fuchsia.h
|
| similarity index 64%
|
| copy from runtime/vm/atomic_android.h
|
| copy to runtime/vm/atomic_fuchsia.h
|
| index 689173a2ac65783aeddafc5828e455bf8c5644c5..d6c0f57b9d698d6cdb0a9a4a9d36074f558f55b2 100644
|
| --- a/runtime/vm/atomic_android.h
|
| +++ b/runtime/vm/atomic_fuchsia.h
|
| @@ -1,43 +1,46 @@
|
| -// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
| +// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
|
| // 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.
|
|
|
| -#ifndef VM_ATOMIC_ANDROID_H_
|
| -#define VM_ATOMIC_ANDROID_H_
|
| +#ifndef VM_ATOMIC_FUCHSIA_H_
|
| +#define VM_ATOMIC_FUCHSIA_H_
|
|
|
| #if !defined VM_ATOMIC_H_
|
| -#error Do not include atomic_android.h directly. Use atomic.h instead.
|
| +#error Do not include atomic_fuchsia.h directly. Use atomic.h instead.
|
| #endif
|
|
|
| -#if !defined(TARGET_OS_ANDROID)
|
| -#error This file should only be included on Android builds.
|
| +#if !defined(TARGET_OS_FUCHSIA)
|
| +#error This file should only be included on Fuchsia builds.
|
| #endif
|
|
|
| -namespace dart {
|
| +#include "platform/assert.h"
|
|
|
| +namespace dart {
|
|
|
| inline uintptr_t AtomicOperations::FetchAndIncrement(uintptr_t* p) {
|
| - return __sync_fetch_and_add(p, 1);
|
| + UNIMPLEMENTED();
|
| + return 0;
|
| }
|
|
|
|
|
| inline void AtomicOperations::IncrementBy(intptr_t* p, intptr_t value) {
|
| - __sync_fetch_and_add(p, value);
|
| + UNIMPLEMENTED();
|
| }
|
|
|
|
|
| inline void AtomicOperations::IncrementInt64By(int64_t* p, int64_t value) {
|
| - __sync_fetch_and_add(p, value);
|
| + UNIMPLEMENTED();
|
| }
|
|
|
|
|
| inline uintptr_t AtomicOperations::FetchAndDecrement(uintptr_t* p) {
|
| - return __sync_fetch_and_sub(p, 1);
|
| + UNIMPLEMENTED();
|
| + return 0;
|
| }
|
|
|
|
|
| inline void AtomicOperations::DecrementBy(intptr_t* p, intptr_t value) {
|
| - __sync_fetch_and_sub(p, value);
|
| + UNIMPLEMENTED();
|
| }
|
|
|
|
|
| @@ -45,17 +48,19 @@ inline void AtomicOperations::DecrementBy(intptr_t* p, intptr_t value) {
|
| inline uword AtomicOperations::CompareAndSwapWord(uword* ptr,
|
| uword old_value,
|
| uword new_value) {
|
| - return __sync_val_compare_and_swap(ptr, old_value, new_value);
|
| + UNIMPLEMENTED();
|
| + return 0;
|
| }
|
|
|
|
|
| inline uint32_t AtomicOperations::CompareAndSwapUint32(uint32_t* ptr,
|
| uint32_t old_value,
|
| uint32_t new_value) {
|
| - return __sync_val_compare_and_swap(ptr, old_value, new_value);
|
| + UNIMPLEMENTED();
|
| + return 0;
|
| }
|
| #endif // !defined(USING_SIMULATOR_ATOMICS)
|
|
|
| } // namespace dart
|
|
|
| -#endif // VM_ATOMIC_ANDROID_H_
|
| +#endif // VM_ATOMIC_FUCHSIA_H_
|
|
|