Lines Matching refs:self

76 static inline uint64_t SafeGetTid(const Thread* self) {  in SafeGetTid()  argument
77 if (self != NULL) { in SafeGetTid()
78 return static_cast<uint64_t>(self->GetTid()); in SafeGetTid()
108 inline void BaseMutex::RegisterAsLocked(Thread* self) { in RegisterAsLocked() argument
109 if (UNLIKELY(self == NULL)) { in RegisterAsLocked()
117 BaseMutex* held_mutex = self->GetHeldMutex(static_cast<LockLevel>(i)); in RegisterAsLocked()
134 self->SetHeldMutex(level_, this); in RegisterAsLocked()
138 inline void BaseMutex::RegisterAsUnlocked(Thread* self) { in RegisterAsUnlocked() argument
139 if (UNLIKELY(self == NULL)) { in RegisterAsUnlocked()
145 CHECK(self->GetHeldMutex(level_) == this) << "Unlocking on unacquired mutex: " << name_; in RegisterAsUnlocked()
147 self->SetHeldMutex(level_, NULL); in RegisterAsUnlocked()
151 inline void ReaderWriterMutex::SharedLock(Thread* self) { in SharedLock() argument
152 DCHECK(self == NULL || self == Thread::Current()); in SharedLock()
162 ScopedContentionRecorder scr(this, GetExclusiveOwnerTid(), SafeGetTid(self)); in SharedLock()
176 RegisterAsLocked(self); in SharedLock()
177 AssertSharedHeld(self); in SharedLock()
180 inline void ReaderWriterMutex::SharedUnlock(Thread* self) { in SharedUnlock() argument
181 DCHECK(self == NULL || self == Thread::Current()); in SharedUnlock()
183 AssertSharedHeld(self); in SharedUnlock()
184 RegisterAsUnlocked(self); in SharedUnlock()
211 inline bool Mutex::IsExclusiveHeld(const Thread* self) const { in IsExclusiveHeld() argument
212 DCHECK(self == NULL || self == Thread::Current()); in IsExclusiveHeld()
213 bool result = (GetExclusiveOwnerTid() == SafeGetTid(self)); in IsExclusiveHeld()
216 if (result && self != NULL && level_ != kMonitorLock && !gAborting) { in IsExclusiveHeld()
217 CHECK_EQ(self->GetHeldMutex(level_), this); in IsExclusiveHeld()
227 inline bool ReaderWriterMutex::IsExclusiveHeld(const Thread* self) const { in IsExclusiveHeld() argument
228 DCHECK(self == NULL || self == Thread::Current()); in IsExclusiveHeld()
229 bool result = (GetExclusiveOwnerTid() == SafeGetTid(self)); in IsExclusiveHeld()
232 if (self != NULL && result) { in IsExclusiveHeld()
233 CHECK_EQ(self->GetHeldMutex(level_), this); in IsExclusiveHeld()