Lines Matching full:mutex
67 void ScopedContextMutexAddRefLock::lock(ContextMutex *mutex) in lock() argument
69 ASSERT(mutex != nullptr); in lock()
71 mMutex = mutex; in lock()
74 // This lock alone must not cause mutex destruction in lock()
120 template <class Mutex>
121 bool SharedContextMutex<Mutex>::try_lock() in try_lock()
127 template <class Mutex>
128 void SharedContextMutex<Mutex>::lock() in lock()
134 template <class Mutex>
135 void SharedContextMutex<Mutex>::unlock() in unlock()
144 template <class Mutex>
145 ANGLE_INLINE SharedContextMutex<Mutex> *SharedContextMutex<Mutex>::doTryLock() in doTryLock()
164 // Unlock, so only the "stable root" mutex remains locked in doTryLock()
175 template <class Mutex>
176 ANGLE_INLINE SharedContextMutex<Mutex> *SharedContextMutex<Mutex>::doLock() in doLock()
195 // Unlock, so only the "stable root" mutex remains locked in doLock()
206 template <class Mutex>
207 ANGLE_INLINE void SharedContextMutex<Mutex>::doUnlock() in doUnlock()
218 template <class Mutex>
219 ANGLE_INLINE SharedContextMutex<Mutex> *SharedContextMutex<Mutex>::doTryLock() in doTryLock()
228 // Unlock, so only the "stable root" mutex remains locked in doTryLock()
240 template <class Mutex>
241 ANGLE_INLINE SharedContextMutex<Mutex> *SharedContextMutex<Mutex>::doLock() in doLock()
249 // Unlock, so only the "stable root" mutex remains locked in doLock()
259 template <class Mutex>
260 ANGLE_INLINE void SharedContextMutex<Mutex>::doUnlock() in doUnlock()
268 template <class Mutex>
269 SharedContextMutex<Mutex>::SharedContextMutex() in SharedContextMutex()
273 template <class Mutex>
274 SharedContextMutex<Mutex>::~SharedContextMutex() in ~SharedContextMutex()
282 template <class Mutex>
283 void SharedContextMutex<Mutex>::Merge(SharedContextMutex *lockedMutex, in Merge()
293 // Mutex merging will update the structure of both mutexes, therefore both mutexes must be in Merge()
294 // locked before continuing. First mutex is already locked, need to lock the other mutex. in Merge()
297 // mutex or already merged), not only merging is unnecessary, but locking otherMutex will in Merge()
322 // May use "doUnlock()" because lockedRoot is a "stable root" mutex. in Merge()
359 // Leave only the "merged" mutex locked. "oldRoot" already merged, need to use "doUnlock()" in Merge()
370 template <class Mutex>
371 void SharedContextMutex<Mutex>::setNewRoot(SharedContextMutex *newRoot) in setNewRoot()
387 template <class Mutex>
388 void SharedContextMutex<Mutex>::addLeaf(SharedContextMutex *leaf) in addLeaf()
397 template <class Mutex>
398 void SharedContextMutex<Mutex>::removeLeaf(SharedContextMutex *leaf) in removeLeaf()
407 template <class Mutex>
408 void SharedContextMutex<Mutex>::onDestroy(UnlockBehaviour unlockBehaviour) in onDestroy()
439 template class SharedContextMutex<std::mutex>;
442 template <class Mutex>
443 ContextMutex *SharedContextMutexManager<Mutex>::create() in create()
445 return new SharedContextMutex<Mutex>(); in create()
448 template <class Mutex>
449 void SharedContextMutexManager<Mutex>::merge(ContextMutex *lockedMutex, ContextMutex *otherMutex) in merge()
451 SharedContextMutex<Mutex>::Merge(static_cast<SharedContextMutex<Mutex> *>(lockedMutex), in merge()
452 static_cast<SharedContextMutex<Mutex> *>(otherMutex)); in merge()
455 template <class Mutex>
456 ContextMutex *SharedContextMutexManager<Mutex>::getRootMutex(ContextMutex *mutex) in getRootMutex() argument
458 return static_cast<SharedContextMutex<Mutex> *>(mutex)->getRoot(); in getRootMutex()
461 template class SharedContextMutexManager<std::mutex>;