Lines Matching refs:thread

163     struct proc *thread;	/* The thread in question.  */  member
337 else if (proc == inf->wait.thread && inf->wait.exc.reply && !force) in proc_abort()
614 if (proc == inf->wait.thread) in _proc_free()
648 inf->wait.thread = 0; in make_inf()
677 inf->wait.thread = 0; in inf_clear_wait()
919 struct proc *thread; in inf_update_suspends() local
932 for (thread = inf->threads; thread; thread = thread->next) in inf_update_suspends()
933 thread_running |= proc_update_sc (thread); in inf_update_suspends()
961 struct proc *thread = inf->threads; in inf_tid_to_thread() local
963 while (thread) in inf_tid_to_thread()
964 if (thread->tid == tid) in inf_tid_to_thread()
965 return thread; in inf_tid_to_thread()
967 thread = thread->next; in inf_tid_to_thread()
975 struct proc *thread = inf->threads; in inf_port_to_thread() local
976 while (thread) in inf_port_to_thread()
977 if (thread->port == port) in inf_port_to_thread()
978 return thread; in inf_port_to_thread()
980 thread = thread->next; in inf_port_to_thread()
1025 struct proc *thread = inf->threads; in inf_validate_procs() local
1029 while (thread) in inf_validate_procs()
1037 if (thread->port == threads[i]) in inf_validate_procs()
1040 matched[i] = thread; in inf_validate_procs()
1041 last = thread; in inf_validate_procs()
1042 thread = thread->next; in inf_validate_procs()
1050 proc_debug (thread, "died!"); in inf_validate_procs()
1051 thread->port = MACH_PORT_NULL; in inf_validate_procs()
1052 thread = _proc_free (thread); /* THREAD is dead. */ in inf_validate_procs()
1053 (last ? last->next : inf->threads) = thread; in inf_validate_procs()
1065 thread = make_proc (inf, threads[i], next_thread_id++); in inf_validate_procs()
1066 (last ? last->next : inf->threads) = thread; in inf_validate_procs()
1067 last = thread; in inf_validate_procs()
1068 proc_debug (thread, "new thread: %d", threads[i]); in inf_validate_procs()
1069 add_thread (pid_to_ptid (thread->tid)); /* Tell GDB's generic thread code. */ in inf_validate_procs()
1097 struct proc *thread; in inf_set_threads_resume_sc() local
1099 for (thread = inf->threads; thread; thread = thread->next) in inf_set_threads_resume_sc()
1100 if (thread == run_thread) in inf_set_threads_resume_sc()
1101 thread->resume_sc = 0; in inf_set_threads_resume_sc()
1103 thread->resume_sc = thread->run_sc; in inf_set_threads_resume_sc()
1105 thread->resume_sc = thread->pause_sc; in inf_set_threads_resume_sc()
1114 struct proc *thread; in inf_resume() local
1118 for (thread = inf->threads; thread; thread = thread->next) in inf_resume()
1119 thread->sc = thread->resume_sc; in inf_resume()
1139 struct proc *thread; in inf_suspend() local
1143 for (thread = inf->threads; thread; thread = thread->next) in inf_suspend()
1144 thread->sc = thread->pause_sc; in inf_suspend()
1157 inf_set_step_thread (struct inf *inf, struct proc *thread) in inf_set_step_thread() argument
1159 gdb_assert (!thread || proc_is_thread (thread)); in inf_set_step_thread()
1161 if (thread) in inf_set_step_thread()
1162 inf_debug (inf, "setting step thread: %d/%d", inf->pid, thread->tid); in inf_set_step_thread()
1166 if (inf->step_thread != thread) in inf_set_step_thread()
1171 if (thread && proc_trace (thread, 1)) in inf_set_step_thread()
1172 inf->step_thread = thread; in inf_set_step_thread()
1216 struct proc *thread; in inf_detach() local
1232 for (thread = inf->threads; thread; thread = thread->next) in inf_detach()
1234 proc_restore_exc_port (thread); in inf_detach()
1235 thread->sc = thread->detach_sc; in inf_detach()
1262 struct proc *thread; in inf_steal_exc_ports() local
1269 for (thread = inf->threads; thread; thread = thread->next) in inf_steal_exc_ports()
1270 proc_steal_exc_port (thread, MACH_PORT_NULL); in inf_steal_exc_ports()
1277 struct proc *thread; in inf_restore_exc_ports() local
1284 for (thread = inf->threads; thread; thread = thread->next) in inf_restore_exc_ports()
1285 proc_restore_exc_port (thread); in inf_restore_exc_ports()
1308 && w->thread && !w->thread->aborted) in inf_signal()
1319 w->thread->port, inf->task->port, in inf_signal()
1324 w->thread->port, inf->task->port, in inf_signal()
1391 struct proc *thread; in inf_continue() local
1393 for (thread = inf->threads; thread; thread = thread->next) in inf_continue()
1394 thread_resume (thread->port); in inf_continue()
1423 struct proc *thread; in gnu_wait() local
1579 thread = inf->wait.thread; in gnu_wait()
1580 if (thread) in gnu_wait()
1581 tid = pid_to_ptid (thread->tid); in gnu_wait()
1583 thread = inf_tid_to_thread (inf, PIDGET (tid)); in gnu_wait()
1585 if (!thread || thread->port == MACH_PORT_NULL) in gnu_wait()
1594 if (thread && PIDGET (tid) >= 0 && status->kind != TARGET_WAITKIND_SPURIOUS in gnu_wait()
1595 && inf->pause_sc == 0 && thread->pause_sc == 0) in gnu_wait()
1599 thread->sc = 1; in gnu_wait()
1623 struct proc *thread = inf_port_to_thread (inf, thread_port); in S_exception_raise_request() local
1629 if (!thread) in S_exception_raise_request()
1633 thread = inf_port_to_thread (inf, thread_port); in S_exception_raise_request()
1634 if (!thread) in S_exception_raise_request()
1642 if (!thread->aborted) in S_exception_raise_request()
1647 inf->wait.thread = thread; in S_exception_raise_request()
1660 if (thread->exc_port == port) in S_exception_raise_request()
1663 thread->saved_exc_port); in S_exception_raise_request()
1664 inf->wait.exc.handler = thread->saved_exc_port; in S_exception_raise_request()
1734 struct proc *thread = inf_port_to_thread (inf, dead_port); in do_mach_notify_dead_name() local
1735 if (thread) in do_mach_notify_dead_name()
1737 proc_debug (thread, "is dead"); in do_mach_notify_dead_name()
1738 thread->port = MACH_PORT_NULL; in do_mach_notify_dead_name()
1950 proc_abort (inf->wait.thread, 1); in gnu_resume()
1952 proc_string (inf->wait.thread), in gnu_resume()
1973 struct proc *thread = inf_tid_to_thread (inf, PIDGET (tid)); in gnu_resume() local
1974 if (!thread) in gnu_resume()
1976 inf_debug (inf, "running one thread: %d/%d", inf->pid, thread->tid); in gnu_resume()
1977 inf_set_threads_resume_sc (inf, thread, 0); in gnu_resume()
2568 struct proc *thread = inf_tid_to_thread (inf, tid); in gnu_pid_to_str() local
2570 if (thread) in gnu_pid_to_str()
2571 return proc_string (thread); in gnu_pid_to_str()
2707 struct proc *thread = inf_tid_to_thread (inf, PIDGET (inferior_ptid)); in cur_thread() local
2708 if (!thread) in cur_thread()
2710 return thread; in cur_thread()
3205 struct proc *thread = cur_thread (); in set_thread_pause_cmd() local
3206 int old_sc = thread->pause_sc; in set_thread_pause_cmd()
3207 thread->pause_sc = parse_bool_arg (args, "set thread pause"); in set_thread_pause_cmd()
3208 if (old_sc == 0 && thread->pause_sc != 0 && thread->inf->pause_sc == 0) in set_thread_pause_cmd()
3211 inf_suspend (thread->inf); in set_thread_pause_cmd()
3217 struct proc *thread = cur_thread (); in show_thread_pause_cmd() local
3218 int sc = thread->pause_sc; in show_thread_pause_cmd()
3221 proc_string (thread), in show_thread_pause_cmd()
3223 !sc && thread->inf->pause_sc ? " (but the task is)" : ""); in show_thread_pause_cmd()
3229 struct proc *thread = cur_thread (); in set_thread_run_cmd() local
3230 thread->run_sc = parse_bool_arg (args, "set thread run") ? 0 : 1; in set_thread_run_cmd()
3236 struct proc *thread = cur_thread (); in show_thread_run_cmd() local
3239 proc_string (thread), in show_thread_run_cmd()
3240 thread->run_sc == 0 ? "is" : "isn't"); in show_thread_run_cmd()
3253 struct proc *thread = cur_thread (); in show_thread_detach_sc_cmd() local
3257 proc_string (thread), in show_thread_detach_sc_cmd()
3258 thread->detach_sc); in show_thread_detach_sc_cmd()
3264 struct proc *thread = cur_thread (); in set_thread_exc_port_cmd() local
3267 steal_exc_port (thread, parse_and_eval_address (args)); in set_thread_exc_port_cmd()
3274 struct proc *thread = cur_thread ();
3278 if (thread->detach_sc != 0)
3286 struct proc *thread = cur_thread (); in thread_takeover_sc_cmd() local
3291 thread_info (thread->port, THREAD_BASIC_INFO, (int *) &info, &info_len); in thread_takeover_sc_cmd()
3294 thread->sc = info->suspend_count; in thread_takeover_sc_cmd()
3296 printf_unfiltered ("Suspend count was %d.\n", thread->sc); in thread_takeover_sc_cmd()