Lines Matching refs:tp

105 	kthread_id_t tp;  in cpr_stop_user()  local
112 tp = curthread->t_next; in cpr_stop_user()
115 p = ttoproc(tp); in cpr_stop_user()
130 thread_lock(tp); /* needed to check CPR_ISTOPPED */ in cpr_stop_user()
132 if (tp->t_state == TS_STOPPED) { in cpr_stop_user()
137 if (tp->t_schedflag & TS_RESUME) in cpr_stop_user()
138 tp->t_schedflag &= ~TS_RESUME; in cpr_stop_user()
141 tp->t_proc_flag |= TP_CHKPT; in cpr_stop_user()
143 thread_unlock(tp); in cpr_stop_user()
147 thread_lock(tp); in cpr_stop_user()
149 aston(tp); in cpr_stop_user()
151 if (ISWAKEABLE(tp) || ISWAITING(tp)) { in cpr_stop_user()
152 setrun_locked(tp); in cpr_stop_user()
158 if (tp->t_state == TS_ONPROC && tp->t_cpu != CPU) in cpr_stop_user()
159 poke_cpu(tp->t_cpu->cpu_id); in cpr_stop_user()
160 thread_unlock(tp); in cpr_stop_user()
163 } while ((tp = tp->t_next) != curthread); in cpr_stop_user()
175 kthread_id_t tp; in cpr_check_user_threads() local
179 tp = curthread->t_next; in cpr_check_user_threads()
181 if (ttoproc(tp)->p_as == &kas || ttoproc(tp)->p_stat == SZOMB) in cpr_check_user_threads()
184 thread_lock(tp); in cpr_check_user_threads()
189 if (!CPR_ISTOPPED(tp)) { in cpr_check_user_threads()
190 thread_unlock(tp); in cpr_check_user_threads()
198 ttoproc(tp)->p_user.u_psargs, (void *)tp, in cpr_check_user_threads()
199 tp->t_state); in cpr_check_user_threads()
205 "sched=%x\n", (void *)tp, tp->t_state, in cpr_check_user_threads()
206 tp->t_proc_flag, tp->t_schedflag); in cpr_check_user_threads()
208 (void *)ttoproc(tp), ttoproc(tp)->p_stat, in cpr_check_user_threads()
209 ttoproc(tp)->p_pidp->pid_id); in cpr_check_user_threads()
212 thread_unlock(tp); in cpr_check_user_threads()
214 } while ((tp = tp->t_next) != curthread && rc == 0); in cpr_check_user_threads()
227 kthread_id_t tp; in cpr_start_user_threads() local
231 tp = curthread->t_next; in cpr_start_user_threads()
233 p = ttoproc(tp); in cpr_start_user_threads()
237 if (ttoproc(tp)->p_as == &kas) continue; in cpr_start_user_threads()
242 tp->t_proc_flag &= ~TP_CHKPT; in cpr_start_user_threads()
245 thread_lock(tp); in cpr_start_user_threads()
246 if (CPR_ISTOPPED(tp)) { in cpr_start_user_threads()
251 tp->t_schedflag |= TS_RESUME; in cpr_start_user_threads()
252 setrun_locked(tp); in cpr_start_user_threads()
254 thread_unlock(tp); in cpr_start_user_threads()
258 } while ((tp = tp->t_next) != curthread); in cpr_start_user_threads()
315 kthread_id_t tp; in cpr_threads_are_stopped() local
324 tp = curthread->t_next; in cpr_threads_are_stopped()
326 p = ttoproc(tp); in cpr_threads_are_stopped()
330 if (tp->t_flag & T_INTR_THREAD) in cpr_threads_are_stopped()
333 if (! callb_is_stopped(tp, &name)) { in cpr_threads_are_stopped()
339 } while ((tp = tp->t_next) != curthread); in cpr_threads_are_stopped()