Changeset 160140 in webkit for trunk/Source/JavaScriptCore/runtime/InitializeThreading.cpp
- Timestamp:
- Dec 4, 2013, 4:06:13 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/InitializeThreading.cpp
r160116 r160140 42 42 #include <wtf/dtoa.h> 43 43 #include <wtf/Threading.h> 44 #include <wtf/ThreadingOnce.h>45 44 #include <wtf/dtoa/cached-powers.h> 46 45 … … 48 47 49 48 namespace JSC { 49 50 #if OS(DARWIN) 51 static pthread_once_t initializeThreadingKeyOnce = PTHREAD_ONCE_INIT; 52 #endif 50 53 51 54 static void initializeThreadingOnce() … … 74 77 void initializeThreading() 75 78 { 76 static WTF::ThreadingOnce initializeThreadingKeyOnce; 77 initializeThreadingKeyOnce.callOnce(initializeThreadingOnce); 79 #if OS(DARWIN) 80 pthread_once(&initializeThreadingKeyOnce, initializeThreadingOnce); 81 #else 82 static bool initializedThreading = false; 83 if (!initializedThreading) { 84 initializeThreadingOnce(); 85 initializedThreading = true; 86 } 87 #endif 78 88 } 79 89
Note:
See TracChangeset
for help on using the changeset viewer.