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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/Atomics.h

Issue 2044343002: DevTools: update V8Inspector to work with the new v8_inspector API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comment addressed Created 4 years, 6 months 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef Atomics_h 5 #ifndef Atomics_h
6 #define Atomics_h 6 #define Atomics_h
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #if COMPILER(MSVC) 10 #if defined(_MSC_VER)
11 #include <windows.h> 11 #include <windows.h>
12 #endif 12 #endif
13 13
14 namespace blink { 14 namespace blink {
15 15
16 #if COMPILER(MSVC) 16 #if defined(_MSC_VER)
17 17
18 inline int atomicIncrement(int volatile* addend) { return InterlockedIncrement(r einterpret_cast<long volatile*>(addend)); } 18 inline int atomicIncrement(int volatile* addend) { return InterlockedIncrement(r einterpret_cast<long volatile*>(addend)); }
19 19
20 #else 20 #else
21 21
22 inline int atomicAdd(int volatile* addend, int increment) { return __sync_add_an d_fetch(addend, increment); } 22 inline int atomicAdd(int volatile* addend, int increment) { return __sync_add_an d_fetch(addend, increment); }
23 inline int atomicIncrement(int volatile* addend) { return atomicAdd(addend, 1); } 23 inline int atomicIncrement(int volatile* addend) { return atomicAdd(addend, 1); }
24 24
25 #endif 25 #endif
26 26
27 } // namespace blink 27 } // namespace blink
28 28
29 #endif /* Atomics_h */ 29 #endif /* Atomics_h */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698