Lines Matching defs:TSD
39 TSD<Allocator> &operator*() { return *CurrentTSD; }
41 TSD<Allocator> *operator->() {
47 TSD<Allocator> *CurrentTSD;
111 // Not supported by the TSD Registry, but not an error either.
124 // Theoretically, we want to mark TSD::lock()/TSD::unlock() with proper
125 // thread annotations. However, given the TSD is only locked on shared
129 Str->append(" Shared TSD[%zu]:\n", I);
136 ALWAYS_INLINE TSD<Allocator> *getTSDAndLock() NO_THREAD_SAFETY_ANALYSIS {
137 TSD<Allocator> *TSD = getCurrentTSD();
138 DCHECK(TSD);
140 if (TSD->tryLock())
141 return TSD;
144 // Only 1 TSD, not need to go any further.
146 TSD->lock();
147 return TSD;
149 return getTSDAndLockSlow(TSD);
161 static_assert(alignof(TSD<Allocator>) >= 2, "");
163 ALWAYS_INLINE void setCurrentTSD(TSD<Allocator> *CurrentTSD) {
168 ALWAYS_INLINE TSD<Allocator> *getCurrentTSD() {
169 return reinterpret_cast<TSD<Allocator> *>(*getTlsPtr() & ~1ULL);
213 NOINLINE TSD<Allocator> *getTSDAndLockSlow(TSD<Allocator> *CurrentTSD)
215 // Use the Precedence of the current TSD as our random seed. Since we are
229 TSD<Allocator> *CandidateTSD = nullptr;
237 // A 0 precedence here means another thread just locked this TSD.
264 TSD<Allocator> TSDs[TSDsArraySize];