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

Side by Side Diff: base/atomicops_internals_x86_msvc.h

Issue 798163004: remove some dead visual studio < 2013 code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove MAYBE macro completely Created 6 years 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
« no previous file with comments | « no previous file | base/logging.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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 return _InterlockedExchangeAdd( 48 return _InterlockedExchangeAdd(
49 reinterpret_cast<volatile LONG*>(ptr), 49 reinterpret_cast<volatile LONG*>(ptr),
50 static_cast<LONG>(increment)) + increment; 50 static_cast<LONG>(increment)) + increment;
51 } 51 }
52 52
53 inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr, 53 inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
54 Atomic32 increment) { 54 Atomic32 increment) {
55 return Barrier_AtomicIncrement(ptr, increment); 55 return Barrier_AtomicIncrement(ptr, increment);
56 } 56 }
57 57
58 #if !(defined(_MSC_VER) && _MSC_VER >= 1400)
59 #error "We require at least vs2005 for MemoryBarrier"
60 #endif
61 inline void MemoryBarrier() { 58 inline void MemoryBarrier() {
62 #if defined(ARCH_CPU_64_BITS) 59 #if defined(ARCH_CPU_64_BITS)
63 // See #undef and note at the top of this file. 60 // See #undef and note at the top of this file.
64 __faststorefence(); 61 __faststorefence();
65 #else 62 #else
66 // We use MemoryBarrier from WinNT.h 63 // We use MemoryBarrier from WinNT.h
67 ::MemoryBarrier(); 64 ::MemoryBarrier();
68 #endif 65 #endif
69 } 66 }
70 67
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 return NoBarrier_CompareAndSwap(ptr, old_value, new_value); 186 return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
190 } 187 }
191 188
192 189
193 #endif // defined(_WIN64) 190 #endif // defined(_WIN64)
194 191
195 } // namespace base::subtle 192 } // namespace base::subtle
196 } // namespace base 193 } // namespace base
197 194
198 #endif // BASE_ATOMICOPS_INTERNALS_X86_MSVC_H_ 195 #endif // BASE_ATOMICOPS_INTERNALS_X86_MSVC_H_
OLDNEW
« no previous file with comments | « no previous file | base/logging.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698