Lines Matching refs:tid
138 int policy, mypri = 0, tid; in busy_thread() local
139 tid = (intptr_t) (((struct thread *)arg)->arg); in busy_thread()
149 printf("Busy Thread %d(%d): Running...\n", tid, mypri); in busy_thread()
157 printf("Busy Thread %d(%d): Exiting\n", tid, mypri); in busy_thread()
164 int policy, rc, mypri = 0, tid, times = 0; in worker_thread() local
165 tid = (intptr_t) (((struct thread *)arg)->arg); in worker_thread()
179 rc = pthread_mutex_lock(&mutex[tid]); in worker_thread()
180 if (tid == 0) in worker_thread()
182 rc = pthread_cond_wait(&cond[tid], &mutex[tid]); in worker_thread()
183 rc = pthread_mutex_unlock(&mutex[tid]); in worker_thread()
186 rt_gettime(), tid, mypri); in worker_thread()
189 if (tid == NUM_WORKERS - 1) { in worker_thread()
190 t_after_wait[tid] = 1; in worker_thread()
198 rc = pthread_mutex_lock(&mutex[tid + 1]); in worker_thread()
199 rc = pthread_cond_signal(&cond[tid + 1]); in worker_thread()
201 rt_gettime(), tid, mypri, rc, tid + 1); in worker_thread()
204 rc = pthread_mutex_unlock(&mutex[tid + 1]); in worker_thread()
207 tid, mypri); in worker_thread()
209 t_after_wait[tid] = 1; in worker_thread()
211 while (t_after_wait[tid + 1] != 1) { in worker_thread()
219 tid, mypri, pend - pstart); in worker_thread()