OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2010 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 16 matching lines...) Expand all Loading... |
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 ThreadSafeRefCounted_h | 30 #ifndef ThreadSafeRefCounted_h |
31 #define ThreadSafeRefCounted_h | 31 #define ThreadSafeRefCounted_h |
32 | 32 |
33 #include "wtf/Atomics.h" | 33 #include "wtf/Atomics.h" |
34 #include "wtf/DynamicAnnotations.h" | 34 #include "wtf/DynamicAnnotations.h" |
35 #include "wtf/FastAllocBase.h" | 35 #include "wtf/FastAllocBase.h" |
36 #include "wtf/Noncopyable.h" | 36 #include "wtf/Noncopyable.h" |
| 37 #include "wtf/Platform.h" |
37 #include "wtf/WTFExport.h" | 38 #include "wtf/WTFExport.h" |
38 | 39 |
39 namespace WTF { | 40 namespace WTF { |
40 | 41 |
41 class WTF_EXPORT ThreadSafeRefCountedBase { | 42 class WTF_EXPORT ThreadSafeRefCountedBase { |
42 WTF_MAKE_NONCOPYABLE(ThreadSafeRefCountedBase); | 43 WTF_MAKE_NONCOPYABLE(ThreadSafeRefCountedBase); |
43 WTF_MAKE_FAST_ALLOCATED; | 44 WTF_MAKE_FAST_ALLOCATED; |
44 public: | 45 public: |
45 ThreadSafeRefCountedBase(int initialRefCount = 1) | 46 ThreadSafeRefCountedBase(int initialRefCount = 1) |
46 : m_refCount(initialRefCount) | 47 : m_refCount(initialRefCount) |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 ThreadSafeRefCounted() | 91 ThreadSafeRefCounted() |
91 { | 92 { |
92 } | 93 } |
93 }; | 94 }; |
94 | 95 |
95 } // namespace WTF | 96 } // namespace WTF |
96 | 97 |
97 using WTF::ThreadSafeRefCounted; | 98 using WTF::ThreadSafeRefCounted; |
98 | 99 |
99 #endif // ThreadSafeRefCounted_h | 100 #endif // ThreadSafeRefCounted_h |
OLD | NEW |