Lines Matching refs:th

232   thread_info *th;
234 for (th = &thread_head; (th = th->next) != NULL;)
235 if (th->id == id)
237 if (!th->suspend_count && get_context)
240 th->suspend_count = SuspendThread (th->h) + 1;
242 th->suspend_count = -1;
243 th->reload_context = 1;
245 return th;
255 thread_info *th;
257 if ((th = thread_rec (id, FALSE)))
258 return th;
260 th = (thread_info *) xmalloc (sizeof (*th));
261 memset (th, 0, sizeof (*th));
262 th->id = id;
263 th->h = h;
264 th->next = thread_head.next;
265 thread_head.next = th;
271 th->context.ContextFlags = CONTEXT_DEBUG_REGISTERS;
272 CHECK (GetThreadContext (th->h, &th->context));
273 th->context.Dr0 = dr[0];
274 th->context.Dr1 = dr[1];
275 th->context.Dr2 = dr[2];
276 th->context.Dr3 = dr[3];
277 /* th->context.Dr6 = dr[6];
279 th->context.Dr7 = dr[7];
280 CHECK (SetThreadContext (th->h, &th->context));
281 th->context.ContextFlags = 0;
283 return th;
291 thread_info *th = &thread_head;
295 while (th->next != NULL)
297 thread_info *here = th->next;
298 th->next = here->next;
308 thread_info *th;
314 for (th = &thread_head;
315 th->next != NULL && th->next->id != id;
316 th = th->next)
319 if (th->next != NULL)
321 thread_info *here = th->next;
322 th->next = here->next;
340 thread_info *th = current_thread;
341 th->context.ContextFlags = CONTEXT_DEBUGGER_DR;
342 GetThreadContext (th->h, &th->context);
344 dr[0] = th->context.Dr0;
345 dr[1] = th->context.Dr1;
346 dr[2] = th->context.Dr2;
347 dr[3] = th->context.Dr3;
348 dr[6] = th->context.Dr6;
349 dr[7] = th->context.Dr7;
1065 thread_info *th;
1071 th = thread_rec (current_event.dwThreadId, -1);
1171 thread_info *th;
1183 for (th = &thread_head; (th = th->next) != NULL;)
1184 if (((id == -1) || (id == (int) th->id)) && th->suspend_count)
1187 for (i = 0; i < th->suspend_count; i++)
1188 (void) ResumeThread (th->h);
1189 th->suspend_count = 0;
1193 th->context.ContextFlags = CONTEXT_DEBUG_REGISTERS;
1194 th->context.Dr0 = dr[0];
1195 th->context.Dr1 = dr[1];
1196 th->context.Dr2 = dr[2];
1197 th->context.Dr3 = dr[3];
1198 /* th->context.Dr6 = dr[6];
1200 th->context.Dr7 = dr[7];
1201 CHECK (SetThreadContext (th->h, &th->context));
1202 th->context.ContextFlags = 0;
1231 thread_info *th;
1245 th = NULL;
1267 th = child_add_thread (current_event.dwThreadId,
1284 th = &dummy_thread_info;
1305 th = child_add_thread (main_thread_id,
1390 current_thread = th ?: thread_rec (current_event.dwThreadId, TRUE);
1971 thread_info *th;
2016 th = thread_rec (current_event.dwThreadId, FALSE);
2017 if (th)
2023 th->context.EFlags |= FLAG_TRACE_BIT;
2026 if (th->context.ContextFlags)
2030 th->context.Dr0 = dr[0];
2031 th->context.Dr1 = dr[1];
2032 th->context.Dr2 = dr[2];
2033 th->context.Dr3 = dr[3];
2034 /* th->context.Dr6 = dr[6];
2036 th->context.Dr7 = dr[7];
2038 CHECK (SetThreadContext (th->h, &th->context));
2039 th->context.ContextFlags = 0;
2188 /* Pass the address ADDR to the inferior in the I'th debug register.