OLD | NEW |
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT | 52 * FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT |
53 * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE | 53 * SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE |
54 * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, | 54 * FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, |
55 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 55 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
56 * DEALINGS IN THE SOFTWARE. | 56 * DEALINGS IN THE SOFTWARE. |
57 */ | 57 */ |
58 | 58 |
59 #ifndef Atomics_h | 59 #ifndef Atomics_h |
60 #define Atomics_h | 60 #define Atomics_h |
61 | 61 |
62 #include <wtf/Platform.h> | 62 #include "wtf/CPU.h" |
63 #include <wtf/StdLibExtras.h> | 63 #include "wtf/Platform.h" |
64 #include <wtf/UnusedParam.h> | 64 #include "wtf/StdLibExtras.h" |
| 65 #include "wtf/UnusedParam.h" |
65 | 66 |
66 #if OS(WINDOWS) | 67 #if OS(WINDOWS) |
67 #include <windows.h> | 68 #include <windows.h> |
68 #elif OS(ANDROID) | 69 #elif OS(ANDROID) |
69 #include <sys/atomics.h> | 70 #include <sys/atomics.h> |
70 #endif | 71 #endif |
71 | 72 |
72 namespace WTF { | 73 namespace WTF { |
73 | 74 |
74 #if OS(WINDOWS) | 75 #if OS(WINDOWS) |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 #endif | 212 #endif |
212 | 213 |
213 } // namespace WTF | 214 } // namespace WTF |
214 | 215 |
215 #if USE(LOCKFREE_THREADSAFEREFCOUNTED) | 216 #if USE(LOCKFREE_THREADSAFEREFCOUNTED) |
216 using WTF::atomicDecrement; | 217 using WTF::atomicDecrement; |
217 using WTF::atomicIncrement; | 218 using WTF::atomicIncrement; |
218 #endif | 219 #endif |
219 | 220 |
220 #endif // Atomics_h | 221 #endif // Atomics_h |
OLD | NEW |