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

Side by Side Diff: Source/wtf/Atomics.h

Issue 23187004: Do not include "wtf/Platform.h" directly (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix win_x64 build Created 7 years, 4 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
« no previous file with comments | « Source/wtf/Assertions.h ('k') | Source/wtf/ByteOrder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2010, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2010, 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) 3 * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 13 matching lines...) Expand all
24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30 #ifndef Atomics_h 30 #ifndef Atomics_h
31 #define Atomics_h 31 #define Atomics_h
32 32
33 #include "wtf/CPU.h" 33 #include "wtf/CPU.h"
34 #include "wtf/Platform.h"
35 #include <stdint.h> 34 #include <stdint.h>
36 35
37 #if OS(WINDOWS) 36 #if OS(WINDOWS)
38 #include <windows.h> 37 #include <windows.h>
39 #elif OS(ANDROID) 38 #elif OS(ANDROID)
40 #include <sys/atomics.h> 39 #include <sys/atomics.h>
41 #endif 40 #endif
42 41
43 namespace WTF { 42 namespace WTF {
44 43
(...skipping 20 matching lines...) Expand all
65 ALWAYS_INLINE int64_t atomicDecrement(int64_t volatile* addend) { return __sync_ sub_and_fetch(addend, 1); } 64 ALWAYS_INLINE int64_t atomicDecrement(int64_t volatile* addend) { return __sync_ sub_and_fetch(addend, 1); }
66 65
67 #endif 66 #endif
68 67
69 } // namespace WTF 68 } // namespace WTF
70 69
71 using WTF::atomicDecrement; 70 using WTF::atomicDecrement;
72 using WTF::atomicIncrement; 71 using WTF::atomicIncrement;
73 72
74 #endif // Atomics_h 73 #endif // Atomics_h
OLDNEW
« no previous file with comments | « Source/wtf/Assertions.h ('k') | Source/wtf/ByteOrder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698