Changeset 165687 in webkit for trunk/Source/WTF/wtf/ThreadingPthreads.cpp
- Timestamp:
- Mar 15, 2014, 5:44:51 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/wtf/ThreadingPthreads.cpp
r165676 r165687 204 204 ThreadIdentifierData::initialize(id); 205 205 } 206 206 207 void changeThreadPriority(ThreadIdentifier threadID, int delta) 208 { 209 pthread_t pthreadHandle; 210 ASSERT(threadID); 211 212 { 213 // We don't want to lock across the call to join, since that can block our thread and cause deadlock. 214 MutexLocker locker(threadMapMutex()); 215 pthreadHandle = pthreadHandleForIdentifierWithLockAlreadyHeld(threadID); 216 ASSERT(pthreadHandle); 217 } 218 219 int policy; 220 struct sched_param param; 221 222 if (pthread_getschedparam(pthread_self(), &policy, ¶m)) 223 return; 224 225 param.sched_priority += delta; 226 227 pthread_setschedparam(pthread_self(), policy, ¶m); 228 } 229 207 230 int waitForThreadCompletion(ThreadIdentifier threadID) 208 231 {
Note:
See TracChangeset
for help on using the changeset viewer.