Changeset 39487 in webkit for trunk/JavaScriptCore/wtf/ThreadingQt.cpp
- Timestamp:
- Dec 27, 2008, 6:54:12 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/wtf/ThreadingQt.cpp
r39337 r39487 81 81 } 82 82 83 static ThreadIdentifier establishIdentifierForThread(QThread*& thread)84 {85 MutexLocker locker(threadMapMutex());86 87 static ThreadIdentifier identifierCount = 1;88 89 threadMap().add(identifierCount, thread);90 91 return identifierCount++;92 }93 94 static void clearThreadForIdentifier(ThreadIdentifier id)95 {96 MutexLocker locker(threadMapMutex());97 98 ASSERT(threadMap().contains(id));99 100 threadMap().remove(id);101 }102 103 83 static ThreadIdentifier identifierByQthreadHandle(QThread*& thread) 104 84 { … … 112 92 113 93 return 0; 94 } 95 96 static ThreadIdentifier establishIdentifierForThread(QThread*& thread) 97 { 98 ASSERT(!identifierByQthreadHandle(thread)); 99 100 MutexLocker locker(threadMapMutex()); 101 102 static ThreadIdentifier identifierCount = 1; 103 104 threadMap().add(identifierCount, thread); 105 106 return identifierCount++; 107 } 108 109 static void clearThreadForIdentifier(ThreadIdentifier id) 110 { 111 MutexLocker locker(threadMapMutex()); 112 113 ASSERT(threadMap().contains(id)); 114 115 threadMap().remove(id); 114 116 } 115 117 … … 146 148 } 147 149 148 ThreadIdentifier createThread (ThreadFunction entryPoint, void* data, const char*)150 ThreadIdentifier createThreadInternal(ThreadFunction entryPoint, void* data, const char*) 149 151 { 150 152 ThreadPrivate* thread = new ThreadPrivate(entryPoint, data);
Note:
See TracChangeset
for help on using the changeset viewer.