| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_MSVC_H_ | 7 #ifndef BASE_ATOMICOPS_INTERNALS_X86_MSVC_H_ |
| 8 #define BASE_ATOMICOPS_INTERNALS_X86_MSVC_H_ | 8 #define BASE_ATOMICOPS_INTERNALS_X86_MSVC_H_ |
| 9 #pragma once | |
| 10 | 9 |
| 11 #include <windows.h> | 10 #include <windows.h> |
| 12 | 11 |
| 13 namespace base { | 12 namespace base { |
| 14 namespace subtle { | 13 namespace subtle { |
| 15 | 14 |
| 16 inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr, | 15 inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr, |
| 17 Atomic32 old_value, | 16 Atomic32 old_value, |
| 18 Atomic32 new_value) { | 17 Atomic32 new_value) { |
| 19 LONG result = InterlockedCompareExchange( | 18 LONG result = InterlockedCompareExchange( |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 return NoBarrier_CompareAndSwap(ptr, old_value, new_value); | 171 return NoBarrier_CompareAndSwap(ptr, old_value, new_value); |
| 173 } | 172 } |
| 174 | 173 |
| 175 | 174 |
| 176 #endif // defined(_WIN64) | 175 #endif // defined(_WIN64) |
| 177 | 176 |
| 178 } // namespace base::subtle | 177 } // namespace base::subtle |
| 179 } // namespace base | 178 } // namespace base |
| 180 | 179 |
| 181 #endif // BASE_ATOMICOPS_INTERNALS_X86_MSVC_H_ | 180 #endif // BASE_ATOMICOPS_INTERNALS_X86_MSVC_H_ |
| OLD | NEW |