Lines Matching refs:TSD
22 TSDs = reinterpret_cast<TSD<Allocator> *>(
23 map(nullptr, sizeof(TSD<Allocator>) * NumberOfTSDs, "scudo:tsd"));
50 sizeof(TSD<Allocator>) * NumberOfTSDs);
62 ALWAYS_INLINE TSD<Allocator> *getTSDAndLock(bool *UnlockRequired) {
63 TSD<Allocator> *TSD = getCurrentTSD();
64 DCHECK(TSD);
67 if (TSD->tryLock())
68 return TSD;
70 return getTSDAndLockSlow(TSD);
86 ALWAYS_INLINE void setCurrentTSD(TSD<Allocator> *CurrentTSD) {
98 ALWAYS_INLINE TSD<Allocator> *getCurrentTSD() {
100 return reinterpret_cast<TSD<Allocator> *>(*getAndroidTlsPtr());
104 return reinterpret_cast<TSD<Allocator> *>(pthread_getspecific(PThreadKey));
123 NOINLINE TSD<Allocator> *getTSDAndLockSlow(TSD<Allocator> *CurrentTSD) {
125 // Use the Precedence of the current TSD as our random seed. Since we are
132 TSD<Allocator> *CandidateTSD = nullptr;
140 // A 0 precedence here means another thread just locked this TSD.
163 TSD<Allocator> *TSDs;
169 static THREADLOCAL TSD<Allocator> *ThreadTSD;
175 THREADLOCAL TSD<Allocator>