Changeset 30842 in webkit for trunk/JavaScriptCore/wtf
- Timestamp:
- Mar 6, 2008, 9:50:08 AM (17 years ago)
- Location:
- trunk/JavaScriptCore/wtf
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/Threading.h
r30522 r30842 92 92 #include <stdint.h> 93 93 94 // For portability, we do not use thread-safe statics natively supported by some compilers (e.g. gcc). 95 #define AtomicallyInitializedStatic(T, name) \ 96 WTF::atomicallyInitializedStaticMutex->lock(); \ 97 static T name; \ 98 WTF::atomicallyInitializedStaticMutex->unlock(); 99 94 100 namespace WTF { 95 101 … … 233 239 void initializeThreading(); 234 240 241 extern Mutex* atomicallyInitializedStaticMutex; 242 235 243 #if !PLATFORM(GTK) 236 244 inline void initializeThreading() 237 245 { 246 if (!atomicallyInitializedStaticMutex) 247 atomicallyInitializedStaticMutex = new Mutex; 238 248 } 239 249 #endif -
trunk/JavaScriptCore/wtf/ThreadingGtk.cpp
r30523 r30842 37 37 namespace WTF { 38 38 39 Mutex* atomicallyInitializedStaticMutex; 40 39 41 void initializeThreading() 40 42 { 41 if (!g_thread_supported()) 43 if (!g_thread_supported()) { 42 44 g_thread_init(NULL); 45 ASSERT(!atomicallyInitializedStaticMutex); 46 atomicallyInitializedStaticMutex = new Mutex; 47 } 43 48 ASSERT(g_thread_supported()); 44 49 } -
trunk/JavaScriptCore/wtf/ThreadingNone.cpp
r30525 r30842 32 32 namespace WTF { 33 33 34 Mutex* atomicallyInitializedStaticMutex; 35 34 36 ThreadIdentifier createThread(ThreadFunction, void*) { return 0; } 35 37 int waitForThreadCompletion(ThreadIdentifier, void**) { return 0; } -
trunk/JavaScriptCore/wtf/ThreadingPthreads.cpp
r30522 r30842 36 36 namespace WTF { 37 37 38 Mutex* atomicallyInitializedStaticMutex; 39 38 40 static Mutex& threadMapMutex() 39 41 { -
trunk/JavaScriptCore/wtf/ThreadingWin.cpp
r30527 r30842 68 68 69 69 namespace WTF { 70 71 Mutex* atomicallyInitializedStaticMutex; 70 72 71 73 static Mutex& threadMapMutex()
Note:
See TracChangeset
for help on using the changeset viewer.