Lines Matching refs:tid

20 ThreadContextBase::ThreadContextBase(u32 tid)
21 : tid(tid), unique_id(0), reuse_count(), os_id(0), user_id(0),
89 // Parent tid makes no sense for the main thread.
90 if (tid != kMainTid)
139 u32 tid = kInvalidTid;
142 tid = tctx->tid;
144 // Allocate new thread context and tid.
145 tid = threads_.size();
146 tctx = context_factory_(tid);
159 CHECK_NE(tid, kInvalidTid);
160 CHECK_LT(tid, max_threads_);
171 CHECK(live_.try_emplace(user_id, tid).second);
175 return tid;
181 for (u32 tid = 0; tid < threads_.size(); tid++) {
182 ThreadContextBase *tctx = threads_[tid];
191 for (u32 tid = 0; tid < threads_.size(); tid++) {
192 ThreadContextBase *tctx = threads_[tid];
194 return tctx->tid;
202 for (u32 tid = 0; tid < threads_.size(); tid++) {
203 ThreadContextBase *tctx = threads_[tid];
221 void ThreadRegistry::SetThreadName(u32 tid, const char *name) {
223 ThreadContextBase *tctx = threads_[tid];
232 if (const auto *tid = live_.find(user_id))
233 threads_[tid->second]->SetName(name);
236 void ThreadRegistry::DetachThread(u32 tid, void *arg) {
238 ThreadContextBase *tctx = threads_[tid];
255 void ThreadRegistry::JoinThread(u32 tid, void *arg) {
260 ThreadContextBase *tctx = threads_[tid];
283 ThreadStatus ThreadRegistry::FinishThread(u32 tid) {
287 ThreadContextBase *tctx = threads_[tid];
310 void ThreadRegistry::StartThread(u32 tid, tid_t os_id, ThreadType thread_type,
314 ThreadContextBase *tctx = threads_[tid];
321 if (tctx->tid == 0)
346 u32 tid;
349 tid = t->second;
351 auto *tctx = threads_[tid];
354 return tid;
357 void ThreadRegistry::SetThreadUserId(u32 tid, uptr user_id) {
359 ThreadContextBase *tctx = threads_[tid];
365 CHECK(live_.try_emplace(user_id, tctx->tid).second);
368 u32 ThreadRegistry::OnFork(u32 tid) {
376 if (tctx->tid == tid || !tctx->user_id)