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_X86_MACOSX_H_ | 7 #ifndef BASE_ATOMICOPS_INTERNALS_MAC_H_ |
8 #define BASE_ATOMICOPS_INTERNALS_X86_MACOSX_H_ | 8 #define BASE_ATOMICOPS_INTERNALS_MAC_H_ |
9 | 9 |
10 #include <libkern/OSAtomic.h> | 10 #include <libkern/OSAtomic.h> |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 namespace subtle { | 13 namespace subtle { |
14 | 14 |
15 inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32 *ptr, | 15 inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32 *ptr, |
16 Atomic32 old_value, | 16 Atomic32 old_value, |
17 Atomic32 new_value) { | 17 Atomic32 new_value) { |
18 Atomic32 prev_value; | 18 Atomic32 prev_value; |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 inline Atomic64 Release_Load(volatile const Atomic64 *ptr) { | 187 inline Atomic64 Release_Load(volatile const Atomic64 *ptr) { |
188 MemoryBarrier(); | 188 MemoryBarrier(); |
189 return *ptr; | 189 return *ptr; |
190 } | 190 } |
191 | 191 |
192 #endif // defined(__LP64__) | 192 #endif // defined(__LP64__) |
193 | 193 |
194 } // namespace base::subtle | 194 } // namespace base::subtle |
195 } // namespace base | 195 } // namespace base |
196 | 196 |
197 #endif // BASE_ATOMICOPS_INTERNALS_X86_MACOSX_H_ | 197 #endif // BASE_ATOMICOPS_INTERNALS_MAC_H_ |
OLD | NEW |