Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: base/atomicops_internals_x86_msvc.h

Issue 360034: Add 64bit support. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/string_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 9
10 #include <windows.h> 10 #include <windows.h>
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) { 152 inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
153 Atomic64 value = *ptr; 153 Atomic64 value = *ptr;
154 return value; 154 return value;
155 } 155 }
156 156
157 inline Atomic64 Release_Load(volatile const Atomic64* ptr) { 157 inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
158 MemoryBarrier(); 158 MemoryBarrier();
159 return *ptr; 159 return *ptr;
160 } 160 }
161 161
162 inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
163 Atomic64 old_value,
164 Atomic64 new_value) {
165 return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
166 }
167
168 inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
169 Atomic64 old_value,
170 Atomic64 new_value) {
171 return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
172 }
173
174
162 #endif // defined(_WIN64) 175 #endif // defined(_WIN64)
163 176
164 } // namespace base::subtle 177 } // namespace base::subtle
165 } // namespace base 178 } // namespace base
166 179
167 #endif // BASE_ATOMICOPS_INTERNALS_X86_MSVC_H_ 180 #endif // BASE_ATOMICOPS_INTERNALS_X86_MSVC_H_
OLDNEW
« no previous file with comments | « no previous file | base/string_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698