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" | |
38 #include "wtf/WTFExport.h" | 37 #include "wtf/WTFExport.h" |
39 | 38 |
40 namespace WTF { | 39 namespace WTF { |
41 | 40 |
42 class WTF_EXPORT ThreadSafeRefCountedBase { | 41 class WTF_EXPORT ThreadSafeRefCountedBase { |
43 WTF_MAKE_NONCOPYABLE(ThreadSafeRefCountedBase); | 42 WTF_MAKE_NONCOPYABLE(ThreadSafeRefCountedBase); |
44 WTF_MAKE_FAST_ALLOCATED; | 43 WTF_MAKE_FAST_ALLOCATED; |
45 public: | 44 public: |
46 ThreadSafeRefCountedBase(int initialRefCount = 1) | 45 ThreadSafeRefCountedBase(int initialRefCount = 1) |
47 : m_refCount(initialRefCount) | 46 : m_refCount(initialRefCount) |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 ThreadSafeRefCounted() | 90 ThreadSafeRefCounted() |
92 { | 91 { |
93 } | 92 } |
94 }; | 93 }; |
95 | 94 |
96 } // namespace WTF | 95 } // namespace WTF |
97 | 96 |
98 using WTF::ThreadSafeRefCounted; | 97 using WTF::ThreadSafeRefCounted; |
99 | 98 |
100 #endif // ThreadSafeRefCounted_h | 99 #endif // ThreadSafeRefCounted_h |
OLD | NEW |