Lines Matching refs:tid
20 ThreadContextBase::ThreadContextBase(u32 tid) in ThreadContextBase() argument
21 : tid(tid), unique_id(0), reuse_count(), os_id(0), user_id(0), in ThreadContextBase()
90 if (tid != kMainTid) in SetCreated()
139 u32 tid = kInvalidTid; in CreateThread() local
142 tid = tctx->tid; in CreateThread()
145 tid = threads_.size(); in CreateThread()
146 tctx = context_factory_(tid); in CreateThread()
159 CHECK_NE(tid, kInvalidTid); in CreateThread()
160 CHECK_LT(tid, max_threads_); in CreateThread()
171 CHECK(live_.try_emplace(user_id, tid).second); in CreateThread()
175 return tid; in CreateThread()
181 for (u32 tid = 0; tid < threads_.size(); tid++) { in RunCallbackForEachThreadLocked() local
182 ThreadContextBase *tctx = threads_[tid]; in RunCallbackForEachThreadLocked()
191 for (u32 tid = 0; tid < threads_.size(); tid++) { in FindThread() local
192 ThreadContextBase *tctx = threads_[tid]; in FindThread()
194 return tctx->tid; in FindThread()
202 for (u32 tid = 0; tid < threads_.size(); tid++) { in FindThreadContextLocked() local
203 ThreadContextBase *tctx = threads_[tid]; in FindThreadContextLocked()
221 void ThreadRegistry::SetThreadName(u32 tid, const char *name) { in SetThreadName() argument
223 ThreadContextBase *tctx = threads_[tid]; in SetThreadName()
232 if (const auto *tid = live_.find(user_id)) in SetThreadNameByUserId() local
233 threads_[tid->second]->SetName(name); in SetThreadNameByUserId()
236 void ThreadRegistry::DetachThread(u32 tid, void *arg) { in DetachThread() argument
238 ThreadContextBase *tctx = threads_[tid]; in DetachThread()
255 void ThreadRegistry::JoinThread(u32 tid, void *arg) { in JoinThread() argument
260 ThreadContextBase *tctx = threads_[tid]; in JoinThread()
283 ThreadStatus ThreadRegistry::FinishThread(u32 tid) { in FinishThread() argument
287 ThreadContextBase *tctx = threads_[tid]; in FinishThread()
310 void ThreadRegistry::StartThread(u32 tid, tid_t os_id, ThreadType thread_type, in StartThread() argument
314 ThreadContextBase *tctx = threads_[tid]; in StartThread()
321 if (tctx->tid == 0) in QuarantinePush()
346 u32 tid; in ConsumeThreadUserId() local
349 tid = t->second; in ConsumeThreadUserId()
351 auto *tctx = threads_[tid]; in ConsumeThreadUserId()
354 return tid; in ConsumeThreadUserId()
357 void ThreadRegistry::SetThreadUserId(u32 tid, uptr user_id) { in SetThreadUserId() argument
359 ThreadContextBase *tctx = threads_[tid]; in SetThreadUserId()
365 CHECK(live_.try_emplace(user_id, tctx->tid).second); in SetThreadUserId()
368 u32 ThreadRegistry::OnFork(u32 tid) { in OnFork() argument
376 if (tctx->tid == tid || !tctx->user_id) in OnFork()