Lines Matching full:tsd
12 #include "tsd.h"
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. in setOption()
124 // Theoretically, we want to mark TSD::lock()/TSD::unlock() with proper in getStats()
125 // thread annotations. However, given the TSD is only locked on shared in getStats()
129 Str->append(" Shared TSD[%zu]:\n", I); in getStats()
136 ALWAYS_INLINE TSD<Allocator> *getTSDAndLock() NO_THREAD_SAFETY_ANALYSIS { in getTSDAndLock()
137 TSD<Allocator> *TSD = getCurrentTSD(); in getTSDAndLock() local
138 DCHECK(TSD); in getTSDAndLock()
140 if (TSD->tryLock()) in getTSDAndLock()
141 return TSD; in getTSDAndLock()
144 // Only 1 TSD, not need to go any further. in getTSDAndLock()
146 TSD->lock(); in getTSDAndLock()
147 return TSD; in getTSDAndLock()
149 return getTSDAndLockSlow(TSD); in getTSDAndLock()
161 static_assert(alignof(TSD<Allocator>) >= 2, "");
163 ALWAYS_INLINE void setCurrentTSD(TSD<Allocator> *CurrentTSD) { in setCurrentTSD()
168 ALWAYS_INLINE TSD<Allocator> *getCurrentTSD() { in getCurrentTSD()
169 return reinterpret_cast<TSD<Allocator> *>(*getTlsPtr() & ~1ULL); in getCurrentTSD()
213 NOINLINE TSD<Allocator> *getTSDAndLockSlow(TSD<Allocator> *CurrentTSD) in getTSDAndLockSlow()
215 // Use the Precedence of the current TSD as our random seed. Since we are in getTSDAndLockSlow()
229 TSD<Allocator> *CandidateTSD = nullptr; in getTSDAndLockSlow()
237 // A 0 precedence here means another thread just locked this TSD. in getTSDAndLockSlow()
264 TSD<Allocator> TSDs[TSDsArraySize];