Changeset 166184 in webkit for trunk/Source/WTF/wtf/ThreadingPthreads.cpp
- Timestamp:
- Mar 24, 2014, 12:25:32 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/wtf/ThreadingPthreads.cpp
r165691 r166184 174 174 auto invocation = std::make_unique<ThreadFunctionInvocation>(entryPoint, data); 175 175 pthread_t threadHandle; 176 if (pthread_create(&threadHandle, 0, wtfThreadEntryPoint, invocation.get())) { 176 pthread_attr_t attr; 177 pthread_attr_init(&attr); 178 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 179 pthread_attr_set_qos_class_np(&attr, QOS_CLASS_USER_INTERACTIVE, 0); 180 #endif 181 int error = pthread_create(&threadHandle, &attr, wtfThreadEntryPoint, invocation.get()); 182 pthread_attr_destroy(&attr); 183 184 if (error) { 177 185 LOG_ERROR("Failed to create pthread at entry point %p with data %p", wtfThreadEntryPoint, invocation.get()); 178 186 return 0; … … 226 234 pthread_setschedparam(pthreadHandle, policy, ¶m); 227 235 } 228 236 237 void setCurrentThreadQOSUtility() 238 { 239 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000 240 pthread_set_qos_class_np(pthread_self(), QOS_CLASS_UTILITY, 0); 241 #endif 242 } 243 229 244 int waitForThreadCompletion(ThreadIdentifier threadID) 230 245 {
Note:
See TracChangeset
for help on using the changeset viewer.