Lines Matching refs:tp

103 	kthread_id_t tp;  in cpr_stop_user()  local
110 tp = curthread->t_next; in cpr_stop_user()
113 p = ttoproc(tp); in cpr_stop_user()
128 thread_lock(tp); /* needed to check CPR_ISTOPPED */ in cpr_stop_user()
130 if (tp->t_state == TS_STOPPED) { in cpr_stop_user()
135 if (tp->t_schedflag & TS_RESUME) in cpr_stop_user()
136 tp->t_schedflag &= ~TS_RESUME; in cpr_stop_user()
139 tp->t_proc_flag |= TP_CHKPT; in cpr_stop_user()
141 thread_unlock(tp); in cpr_stop_user()
145 thread_lock(tp); in cpr_stop_user()
147 aston(tp); in cpr_stop_user()
149 if (ISWAKEABLE(tp) || ISWAITING(tp)) { in cpr_stop_user()
150 setrun_locked(tp); in cpr_stop_user()
156 if (tp->t_state == TS_ONPROC && tp->t_cpu != CPU) in cpr_stop_user()
157 poke_cpu(tp->t_cpu->cpu_id); in cpr_stop_user()
158 thread_unlock(tp); in cpr_stop_user()
161 } while ((tp = tp->t_next) != curthread); in cpr_stop_user()
173 kthread_id_t tp; in cpr_check_user_threads() local
177 tp = curthread->t_next; in cpr_check_user_threads()
179 if (ttoproc(tp)->p_as == &kas || ttoproc(tp)->p_stat == SZOMB) in cpr_check_user_threads()
182 thread_lock(tp); in cpr_check_user_threads()
187 if (!CPR_ISTOPPED(tp)) { in cpr_check_user_threads()
188 thread_unlock(tp); in cpr_check_user_threads()
196 ttoproc(tp)->p_user.u_psargs, (void *)tp, in cpr_check_user_threads()
197 tp->t_state); in cpr_check_user_threads()
203 "sched=%x\n", (void *)tp, tp->t_state, in cpr_check_user_threads()
204 tp->t_proc_flag, tp->t_schedflag); in cpr_check_user_threads()
206 (void *)ttoproc(tp), ttoproc(tp)->p_stat, in cpr_check_user_threads()
207 ttoproc(tp)->p_pidp->pid_id); in cpr_check_user_threads()
210 thread_unlock(tp); in cpr_check_user_threads()
212 } while ((tp = tp->t_next) != curthread && rc == 0); in cpr_check_user_threads()
225 kthread_id_t tp; in cpr_start_user_threads() local
229 tp = curthread->t_next; in cpr_start_user_threads()
231 p = ttoproc(tp); in cpr_start_user_threads()
235 if (ttoproc(tp)->p_as == &kas) continue; in cpr_start_user_threads()
240 tp->t_proc_flag &= ~TP_CHKPT; in cpr_start_user_threads()
243 thread_lock(tp); in cpr_start_user_threads()
244 if (CPR_ISTOPPED(tp)) { in cpr_start_user_threads()
249 tp->t_schedflag |= TS_RESUME; in cpr_start_user_threads()
250 setrun_locked(tp); in cpr_start_user_threads()
252 thread_unlock(tp); in cpr_start_user_threads()
256 } while ((tp = tp->t_next) != curthread); in cpr_start_user_threads()
313 kthread_id_t tp; in cpr_threads_are_stopped() local
322 tp = curthread->t_next; in cpr_threads_are_stopped()
324 p = ttoproc(tp); in cpr_threads_are_stopped()
328 if (tp->t_flag & T_INTR_THREAD) in cpr_threads_are_stopped()
331 if (! callb_is_stopped(tp, &name)) { in cpr_threads_are_stopped()
337 } while ((tp = tp->t_next) != curthread); in cpr_threads_are_stopped()