Changeset 160116 in webkit for trunk/Source/JavaScriptCore/runtime/InitializeThreading.cpp
- Timestamp:
- Dec 4, 2013, 12:43:21 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/InitializeThreading.cpp
r157539 r160116 42 42 #include <wtf/dtoa.h> 43 43 #include <wtf/Threading.h> 44 #include <wtf/ThreadingOnce.h> 44 45 #include <wtf/dtoa/cached-powers.h> 45 46 … … 47 48 48 49 namespace JSC { 49 50 #if OS(DARWIN)51 static pthread_once_t initializeThreadingKeyOnce = PTHREAD_ONCE_INIT;52 #endif53 50 54 51 static void initializeThreadingOnce() … … 77 74 void initializeThreading() 78 75 { 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 76 static WTF::ThreadingOnce initializeThreadingKeyOnce; 77 initializeThreadingKeyOnce.callOnce(initializeThreadingOnce); 88 78 } 89 79
Note:
See TracChangeset
for help on using the changeset viewer.