Lines Matching refs:tid
61 ThreadState *VG_(get_ThreadState)(ThreadId tid)
63 vg_assert(tid >= 0 && tid < VG_N_THREADS);
64 vg_assert(VG_(threads)[tid].tid == tid);
65 return &VG_(threads)[tid];
68 Bool VG_(is_valid_tid) ( ThreadId tid )
70 /* tid is unsigned, hence no < 0 test. */
71 if (tid == 0) return False;
72 if (tid >= VG_N_THREADS) return False;
73 if (VG_(threads)[tid].status == VgTs_Empty) return False;
83 Bool VG_(is_running_thread)(ThreadId tid)
85 ThreadState *tst = VG_(get_ThreadState)(tid);
88 // tst->os_state.lwpid == VG_(gettid)() && // check we're this tid
89 VG_(running_tid) == tid && // and that we've got the lock
94 inline Bool VG_(is_exiting)(ThreadId tid)
96 vg_assert(VG_(is_valid_tid)(tid));
97 return VG_(threads)[tid].exitreason != VgSrc_None;
104 ThreadId tid;
106 for(tid = 1; tid < VG_N_THREADS; tid++)
107 if (VG_(threads)[tid].status != VgTs_Empty &&
108 VG_(threads)[tid].status != VgTs_Zombie)
118 ThreadId tid;
120 for(tid = 1; tid < VG_N_THREADS; tid++)
121 if (VG_(threads)[tid].status == VgTs_Runnable)
131 ThreadId tid;
133 for(tid = 1; tid < VG_N_THREADS; tid++)
134 if (VG_(threads)[tid].status != VgTs_Empty
135 && VG_(threads)[tid].os_state.lwpid == lwp)
136 return tid;