Lines Matching refs:Thread
54 class Thread; variable
108 void RegisterAsLocked(Thread* self);
110 void RegisterAsUnlocked(Thread* self);
111 void CheckSafeToWait(Thread* self);
180 void ExclusiveLock(Thread* self) ACQUIRE();
181 void Lock(Thread* self) ACQUIRE() { ExclusiveLock(self); } in Lock()
184 bool ExclusiveTryLock(Thread* self) TRY_ACQUIRE(true);
185 bool TryLock(Thread* self) TRY_ACQUIRE(true) { return ExclusiveTryLock(self); } in TryLock()
187 bool ExclusiveTryLockWithSpinning(Thread* self) TRY_ACQUIRE(true);
190 void ExclusiveUnlock(Thread* self) RELEASE();
191 void Unlock(Thread* self) RELEASE() { ExclusiveUnlock(self); } in Unlock()
194 ALWAYS_INLINE bool IsExclusiveHeld(const Thread* self) const;
197 ALWAYS_INLINE void AssertExclusiveHeld(const Thread* self) const ASSERT_CAPABILITY(this);
198 ALWAYS_INLINE void AssertHeld(const Thread* self) const ASSERT_CAPABILITY(this);
201 void AssertNotHeldExclusive(const Thread* self) ASSERT_CAPABILITY(!*this) { in AssertNotHeldExclusive()
206 void AssertNotHeld(const Thread* self) ASSERT_CAPABILITY(!*this) { in AssertNotHeld()
234 void ExclusiveLockUncontendedFor(Thread* new_owner);
307 void ExclusiveLock(Thread* self) ACQUIRE();
308 void WriterLock(Thread* self) ACQUIRE() { ExclusiveLock(self); } in WriterLock()
311 void ExclusiveUnlock(Thread* self) RELEASE();
312 void WriterUnlock(Thread* self) RELEASE() { ExclusiveUnlock(self); } in WriterUnlock()
317 bool ExclusiveLockWithTimeout(Thread* self, int64_t ms, int32_t ns)
322 void SharedLock(Thread* self) ACQUIRE_SHARED() ALWAYS_INLINE;
323 void ReaderLock(Thread* self) ACQUIRE_SHARED() { SharedLock(self); } in ReaderLock()
326 bool SharedTryLock(Thread* self) SHARED_TRYLOCK_FUNCTION(true);
329 void SharedUnlock(Thread* self) RELEASE_SHARED() ALWAYS_INLINE;
330 void ReaderUnlock(Thread* self) RELEASE_SHARED() { SharedUnlock(self); } in ReaderUnlock()
333 ALWAYS_INLINE bool IsExclusiveHeld(const Thread* self) const;
336 ALWAYS_INLINE void AssertExclusiveHeld(const Thread* self) const ASSERT_CAPABILITY(this);
337 ALWAYS_INLINE void AssertWriterHeld(const Thread* self) const ASSERT_CAPABILITY(this);
340 void AssertNotExclusiveHeld(const Thread* self) ASSERT_CAPABILITY(!this) { in AssertNotExclusiveHeld()
345 void AssertNotWriterHeld(const Thread* self) ASSERT_CAPABILITY(!this) { in AssertNotWriterHeld()
350 bool IsSharedHeld(const Thread* self) const;
353 ALWAYS_INLINE void AssertSharedHeld(const Thread* self) ASSERT_SHARED_CAPABILITY(this) { in AssertSharedHeld()
359 ALWAYS_INLINE void AssertReaderHeld(const Thread* self) ASSERT_SHARED_CAPABILITY(this) { in AssertReaderHeld()
365 ALWAYS_INLINE void AssertNotHeld(const Thread* self) ASSERT_CAPABILITY(!this) { in AssertNotHeld()
387 void HandleSharedLockContention(Thread* self, int32_t cur_state);
431 friend class Thread;
432 void TransitionFromRunnableToSuspended(Thread* self) UNLOCK_FUNCTION() ALWAYS_INLINE;
433 void TransitionFromSuspendedToRunnable(Thread* self) SHARED_LOCK_FUNCTION() ALWAYS_INLINE;
446 void Broadcast(Thread* self);
448 void Signal(Thread* self);
451 void Wait(Thread* self) NO_THREAD_SAFETY_ANALYSIS;
452 bool TimedWait(Thread* self, int64_t ms, int32_t ns) NO_THREAD_SAFETY_ANALYSIS;
456 void WaitHoldingLocks(Thread* self) NO_THREAD_SAFETY_ANALYSIS;
458 void CheckSafeToWait(Thread* self) NO_THREAD_SAFETY_ANALYSIS { in CheckSafeToWait()
490 MutexLock(Thread* self, Mutex& mu) ACQUIRE(mu) : self_(self), mu_(mu) { in MutexLock()
499 Thread* const self_;
508 ALWAYS_INLINE ReaderMutexLock(Thread* self, ReaderWriterMutex& mu) ACQUIRE(mu);
513 Thread* const self_;
522 WriterMutexLock(Thread* self, ReaderWriterMutex& mu) EXCLUSIVE_LOCK_FUNCTION(mu) : in WriterMutexLock()
532 Thread* const self_;