| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file is an internal atomic implementation, use base/atomicops.h instead. | 5 // This file is an internal atomic implementation, use base/atomicops.h instead. |
| 6 | 6 |
| 7 #ifndef BASE_ATOMICOPS_INTERNALS_ATOMICWORD_COMPAT_H_ | 7 #ifndef BASE_ATOMICOPS_INTERNALS_ATOMICWORD_COMPAT_H_ |
| 8 #define BASE_ATOMICOPS_INTERNALS_ATOMICWORD_COMPAT_H_ | 8 #define BASE_ATOMICOPS_INTERNALS_ATOMICWORD_COMPAT_H_ |
| 9 #pragma once | |
| 10 | 9 |
| 11 // AtomicWord is a synonym for intptr_t, and Atomic32 is a synonym for int32, | 10 // AtomicWord is a synonym for intptr_t, and Atomic32 is a synonym for int32, |
| 12 // which in turn means int. On some LP32 platforms, intptr_t is an int, but | 11 // which in turn means int. On some LP32 platforms, intptr_t is an int, but |
| 13 // on others, it's a long. When AtomicWord and Atomic32 are based on different | 12 // on others, it's a long. When AtomicWord and Atomic32 are based on different |
| 14 // fundamental types, their pointers are incompatible. | 13 // fundamental types, their pointers are incompatible. |
| 15 // | 14 // |
| 16 // This file defines function overloads to allow both AtomicWord and Atomic32 | 15 // This file defines function overloads to allow both AtomicWord and Atomic32 |
| 17 // data to be used with this interface. | 16 // data to be used with this interface. |
| 18 // | 17 // |
| 19 // On LP64 platforms, AtomicWord and Atomic64 are both always long, | 18 // On LP64 platforms, AtomicWord and Atomic64 are both always long, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 return base::subtle::Release_Load( | 91 return base::subtle::Release_Load( |
| 93 reinterpret_cast<volatile const Atomic32*>(ptr)); | 92 reinterpret_cast<volatile const Atomic32*>(ptr)); |
| 94 } | 93 } |
| 95 | 94 |
| 96 } // namespace base::subtle | 95 } // namespace base::subtle |
| 97 } // namespace base | 96 } // namespace base |
| 98 | 97 |
| 99 #endif // !defined(ARCH_CPU_64_BITS) | 98 #endif // !defined(ARCH_CPU_64_BITS) |
| 100 | 99 |
| 101 #endif // BASE_ATOMICOPS_INTERNALS_ATOMICWORD_COMPAT_H_ | 100 #endif // BASE_ATOMICOPS_INTERNALS_ATOMICWORD_COMPAT_H_ |
| OLD | NEW |