Lines Matching refs:th

161     stack_size = (size_t)TCR_PTR(thr->th.th_info.ds.ds_stacksize);  in __kmp_get_global_thread_id()
162 stack_base = (char *)TCR_PTR(thr->th.th_info.ds.ds_stackbase); in __kmp_get_global_thread_id()
192 if (!TCR_4(other_threads[i]->th.th_info.ds.ds_stackgrow)) { in __kmp_get_global_thread_id()
196 stack_base = (char *)other_threads[i]->th.th_info.ds.ds_stackbase; in __kmp_get_global_thread_id()
198 TCW_PTR(other_threads[i]->th.th_info.ds.ds_stackbase, stack_addr); in __kmp_get_global_thread_id()
199 TCW_PTR(other_threads[i]->th.th_info.ds.ds_stacksize, in __kmp_get_global_thread_id()
200 other_threads[i]->th.th_info.ds.ds_stacksize + stack_addr - in __kmp_get_global_thread_id()
203 TCW_PTR(other_threads[i]->th.th_info.ds.ds_stacksize, in __kmp_get_global_thread_id()
209 char *stack_end = (char *)other_threads[i]->th.th_info.ds.ds_stackbase; in __kmp_get_global_thread_id()
210 char *stack_beg = stack_end - other_threads[i]->th.th_info.ds.ds_stacksize; in __kmp_get_global_thread_id()
212 other_threads[i]->th.th_info.ds.ds_stacksize, in __kmp_get_global_thread_id()
261 void __kmp_check_stack_overlap(kmp_info_t *th) { in __kmp_check_stack_overlap() argument
269 stack_end = (char *)th->th.th_info.ds.ds_stackbase; in __kmp_check_stack_overlap()
270 stack_beg = stack_end - th->th.th_info.ds.ds_stacksize; in __kmp_check_stack_overlap()
272 gtid = __kmp_gtid_from_thread(th); in __kmp_check_stack_overlap()
276 gtid, stack_beg, stack_end, th->th.th_info.ds.ds_stacksize, in __kmp_check_stack_overlap()
278 (th->th.th_info.ds.ds_stackgrow) ? "initial" : "actual"); in __kmp_check_stack_overlap()
281 gtid, stack_beg, stack_end, th->th.th_info.ds.ds_stacksize, in __kmp_check_stack_overlap()
283 (th->th.th_info.ds.ds_stackgrow) ? "initial" : "actual"); in __kmp_check_stack_overlap()
289 gtid = __kmp_gtid_from_thread(th); in __kmp_check_stack_overlap()
294 stack_end = (char *)th->th.th_info.ds.ds_stackbase; in __kmp_check_stack_overlap()
295 stack_beg = stack_end - th->th.th_info.ds.ds_stacksize; in __kmp_check_stack_overlap()
301 if (f_th && f_th != th) { in __kmp_check_stack_overlap()
303 (char *)TCR_PTR(f_th->th.th_info.ds.ds_stackbase); in __kmp_check_stack_overlap()
305 other_stack_end - (size_t)TCR_PTR(f_th->th.th_info.ds.ds_stacksize); in __kmp_check_stack_overlap()
313 (size_t)TCR_PTR(f_th->th.th_info.ds.ds_stacksize), in __kmp_check_stack_overlap()
465 __kmp_print_storage_map_gtid(gtid, &thr->th.th_info, &thr->th.th_team, in __kmp_print_thread_storage_map()
468 __kmp_print_storage_map_gtid(gtid, &thr->th.th_local, &thr->th.th_pri_head, in __kmp_print_thread_storage_map()
472 gtid, &thr->th.th_bar[0], &thr->th.th_bar[bs_last_barrier], in __kmp_print_thread_storage_map()
475 __kmp_print_storage_map_gtid(gtid, &thr->th.th_bar[bs_plain_barrier], in __kmp_print_thread_storage_map()
476 &thr->th.th_bar[bs_plain_barrier + 1], in __kmp_print_thread_storage_map()
480 __kmp_print_storage_map_gtid(gtid, &thr->th.th_bar[bs_forkjoin_barrier], in __kmp_print_thread_storage_map()
481 &thr->th.th_bar[bs_forkjoin_barrier + 1], in __kmp_print_thread_storage_map()
486 __kmp_print_storage_map_gtid(gtid, &thr->th.th_bar[bs_reduction_barrier], in __kmp_print_thread_storage_map()
487 &thr->th.th_bar[bs_reduction_barrier + 1], in __kmp_print_thread_storage_map()
584 kmp_info_t *th = __kmp_threads[i]; in __kmp_reset_locks_on_process_detach() local
585 if (th == NULL) in __kmp_reset_locks_on_process_detach()
587 int gtid = th->th.th_info.ds.ds_gtid; in __kmp_reset_locks_on_process_detach()
593 int alive = __kmp_is_thread_alive(th, &exit_val); in __kmp_reset_locks_on_process_detach()
702 if (__kmp_threads[gtid]->th.th_root->r.r_active) in __kmp_parallel_deo()
728 if (__kmp_threads[gtid]->th.th_root->r.r_active) in __kmp_parallel_dxo()
749 kmp_info_t *th; in __kmp_enter_single() local
755 th = __kmp_threads[gtid]; in __kmp_enter_single()
756 team = th->th.th_team; in __kmp_enter_single()
759 th->th.th_ident = id_ref; in __kmp_enter_single()
764 kmp_int32 old_this = th->th.th_local.this_construct; in __kmp_enter_single()
766 ++th->th.th_local.this_construct; in __kmp_enter_single()
772 th->th.th_local.this_construct); in __kmp_enter_single()
778 th->th.th_teams_microtask == NULL && in __kmp_enter_single()
1009 master_th->th.th_info.ds.ds_tid = 0; in __kmp_fork_team_threads()
1010 master_th->th.th_team = team; in __kmp_fork_team_threads()
1011 master_th->th.th_team_nproc = team->t.t_nproc; in __kmp_fork_team_threads()
1012 master_th->th.th_team_master = master_th; in __kmp_fork_team_threads()
1013 master_th->th.th_team_serialized = FALSE; in __kmp_fork_team_threads()
1014 master_th->th.th_dispatch = &team->t.t_dispatch[0]; in __kmp_fork_team_threads()
1019 kmp_hot_team_ptr_t *hot_teams = master_th->th.th_hot_teams; in __kmp_fork_team_threads()
1023 if (master_th->th.th_teams_microtask) { // are we inside the teams? in __kmp_fork_team_threads()
1024 if (master_th->th.th_teams_size.nteams > 1) { in __kmp_fork_team_threads()
1029 master_th->th.th_teams_level == team->t.t_level) { in __kmp_fork_team_threads()
1064 KMP_DEBUG_ASSERT(thr->th.th_team == team); in __kmp_fork_team_threads()
1073 thr->th.th_teams_microtask = master_th->th.th_teams_microtask; in __kmp_fork_team_threads()
1074 thr->th.th_teams_level = master_th->th.th_teams_level; in __kmp_fork_team_threads()
1075 thr->th.th_teams_size = master_th->th.th_teams_size; in __kmp_fork_team_threads()
1079 kmp_balign_t *balign = team->t.t_threads[i]->th.th_bar; in __kmp_fork_team_threads()
1099 if (thr->th.th_prev_num_threads != team->t.t_nproc || in __kmp_fork_team_threads()
1100 thr->th.th_prev_level != team->t.t_level) { in __kmp_fork_team_threads()
1193 serial_team = this_thr->th.th_serial_team; in __kmp_serialized_parallel()
1201 this_thr->th.th_task_team == in __kmp_serialized_parallel()
1202 this_thr->th.th_team->t.t_task_team[this_thr->th.th_task_state]); in __kmp_serialized_parallel()
1203 KMP_DEBUG_ASSERT(serial_team->t.t_task_team[this_thr->th.th_task_state] == in __kmp_serialized_parallel()
1207 global_tid, this_thr->th.th_task_team, this_thr->th.th_team)); in __kmp_serialized_parallel()
1208 this_thr->th.th_task_team = NULL; in __kmp_serialized_parallel()
1212 kmp_proc_bind_t proc_bind = this_thr->th.th_set_proc_bind; in __kmp_serialized_parallel()
1213 if (this_thr->th.th_current_task->td_icvs.proc_bind == proc_bind_false) { in __kmp_serialized_parallel()
1218 proc_bind = this_thr->th.th_current_task->td_icvs.proc_bind; in __kmp_serialized_parallel()
1221 this_thr->th.th_set_proc_bind = proc_bind_default; in __kmp_serialized_parallel()
1229 this_thr->th.ompt_thread_info.state != ompt_state_overhead) { in __kmp_serialized_parallel()
1246 if (this_thr->th.th_team != serial_team) { in __kmp_serialized_parallel()
1248 int level = this_thr->th.th_team->t.t_level; in __kmp_serialized_parallel()
1257 new_team = __kmp_allocate_team(this_thr->th.th_root, 1, 1, in __kmp_serialized_parallel()
1264 &this_thr->th.th_current_task->td_icvs, in __kmp_serialized_parallel()
1271 new_team->t.t_parent = this_thr->th.th_team; in __kmp_serialized_parallel()
1273 this_thr->th.th_serial_team = serial_team; in __kmp_serialized_parallel()
1293 KMP_DEBUG_ASSERT(this_thr->th.th_team != serial_team); in __kmp_serialized_parallel()
1297 serial_team->t.t_parent = this_thr->th.th_team; in __kmp_serialized_parallel()
1298 serial_team->t.t_sched.sched = this_thr->th.th_team->t.t_sched.sched; in __kmp_serialized_parallel()
1299 this_thr->th.th_team = serial_team; in __kmp_serialized_parallel()
1300 serial_team->t.t_master_tid = this_thr->th.th_info.ds.ds_tid; in __kmp_serialized_parallel()
1303 this_thr->th.th_current_task)); in __kmp_serialized_parallel()
1304 KMP_ASSERT(this_thr->th.th_current_task->td_flags.executing == 1); in __kmp_serialized_parallel()
1305 this_thr->th.th_current_task->td_flags.executing = 0; in __kmp_serialized_parallel()
1312 copy_icvs(&this_thr->th.th_current_task->td_icvs, in __kmp_serialized_parallel()
1313 &this_thr->th.th_current_task->td_parent->td_icvs); in __kmp_serialized_parallel()
1318 this_thr->th.th_current_task->td_icvs.nproc = in __kmp_serialized_parallel()
1325 this_thr->th.th_current_task->td_icvs.proc_bind = in __kmp_serialized_parallel()
1333 this_thr->th.th_info.ds.ds_tid = 0; in __kmp_serialized_parallel()
1336 this_thr->th.th_team_nproc = 1; in __kmp_serialized_parallel()
1337 this_thr->th.th_team_master = this_thr; in __kmp_serialized_parallel()
1338 this_thr->th.th_team_serialized = 1; in __kmp_serialized_parallel()
1343 serial_team->t.t_def_allocator = this_thr->th.th_def_allocator; // save in __kmp_serialized_parallel()
1355 this_thr->th.th_dispatch = serial_team->t.t_dispatch; in __kmp_serialized_parallel()
1362 KMP_DEBUG_ASSERT(this_thr->th.th_team == serial_team); in __kmp_serialized_parallel()
1366 this_thr->th.th_team_serialized = serial_team->t.t_serialized; in __kmp_serialized_parallel()
1369 int level = this_thr->th.th_team->t.t_level; in __kmp_serialized_parallel()
1373 this_thr->th.th_current_task->td_icvs.nproc = in __kmp_serialized_parallel()
1390 this_thr->th.th_dispatch = serial_team->t.t_dispatch; in __kmp_serialized_parallel()
1402 if (this_thr->th.th_prev_level != serial_team->t.t_level || in __kmp_serialized_parallel()
1403 this_thr->th.th_prev_num_threads != 1) { in __kmp_serialized_parallel()
1406 this_thr->th.th_prev_level = serial_team->t.t_level; in __kmp_serialized_parallel()
1407 this_thr->th.th_prev_num_threads = 1; in __kmp_serialized_parallel()
1417 this_thr->th.ompt_thread_info.state != ompt_state_overhead) { in __kmp_serialized_parallel()
1438 this_thr->th.ompt_thread_info.state = ompt_state_work_parallel; in __kmp_serialized_parallel()
1498 parent_team = master_th->th.th_team; in __kmp_fork_call()
1499 master_tid = master_th->th.th_info.ds.ds_tid; in __kmp_fork_call()
1500 master_this_cons = master_th->th.th_local.this_construct; in __kmp_fork_call()
1501 root = master_th->th.th_root; in __kmp_fork_call()
1503 master_set_numthreads = master_th->th.th_set_nproc; in __kmp_fork_call()
1525 teams_level = master_th->th.th_teams_level; in __kmp_fork_call()
1528 p_hot_teams = &master_th->th.th_hot_teams; in __kmp_fork_call()
1548 master_th->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_fork_call()
1552 master_th->th.th_ident = loc; in __kmp_fork_call()
1555 if (master_th->th.th_teams_microtask && ap && in __kmp_fork_call()
1572 if (parent_team == master_th->th.th_serial_team) { in __kmp_fork_call()
1604 master_th->th.ompt_thread_info.state = ompt_state_work_parallel; in __kmp_fork_call()
1637 master_th->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_fork_call()
1649 parent_team->t.t_def_allocator = master_th->th.th_def_allocator; // save in __kmp_fork_call()
1654 if (master_set_numthreads < master_th->th.th_teams_size.nth) { in __kmp_fork_call()
1659 other_threads[i]->th.th_team_nproc = master_set_numthreads; in __kmp_fork_call()
1663 master_th->th.th_set_nproc = 0; in __kmp_fork_call()
1702 KMP_DEBUG_ASSERT(master_th->th.th_task_team == in __kmp_fork_call()
1703 parent_team->t.t_task_team[master_th->th.th_task_state]); in __kmp_fork_call()
1708 master_th->th.th_current_task->td_icvs.max_active_levels) { in __kmp_fork_call()
1764 master_th->th.th_set_nproc = 0; in __kmp_fork_call()
1784 master_th->th.th_serial_team->t.t_ident = loc; in __kmp_fork_call()
1788 master_th->th.th_serial_team->t.t_level--; in __kmp_fork_call()
1816 master_th->th.ompt_thread_info.state = ompt_state_work_parallel; in __kmp_fork_call()
1849 master_th->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_fork_call()
1853 KMP_DEBUG_ASSERT(master_th->th.th_team == in __kmp_fork_call()
1854 master_th->th.th_serial_team); in __kmp_fork_call()
1855 team = master_th->th.th_team; in __kmp_fork_call()
1917 master_th->th.ompt_thread_info.state = ompt_state_work_parallel; in __kmp_fork_call()
1950 master_th->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_fork_call()
1985 master_th->th.th_current_task, in __kmp_fork_call()
1986 master_th->th.th_current_task->td_icvs.max_active_levels)); in __kmp_fork_call()
1990 master_th->th.th_current_task->td_flags.executing = 0; in __kmp_fork_call()
1993 if (!master_th->th.th_teams_microtask || level > teams_level) in __kmp_fork_call()
2001 int nthreads_icv = master_th->th.th_current_task->td_icvs.nproc; in __kmp_fork_call()
2011 kmp_proc_bind_t proc_bind = master_th->th.th_set_proc_bind; in __kmp_fork_call()
2014 if (master_th->th.th_current_task->td_icvs.proc_bind == proc_bind_false) { in __kmp_fork_call()
2020 proc_bind = master_th->th.th_current_task->td_icvs.proc_bind; in __kmp_fork_call()
2028 master_th->th.th_current_task->td_icvs.proc_bind)) { in __kmp_fork_call()
2034 master_th->th.th_set_proc_bind = proc_bind_default; in __kmp_fork_call()
2043 copy_icvs(&new_icvs, &master_th->th.th_current_task->td_icvs); in __kmp_fork_call()
2075 &master_th->th.th_current_task->td_icvs, in __kmp_fork_call()
2094 if (!master_th->th.th_teams_microtask || level > teams_level) { in __kmp_fork_call()
2117 KMP_CHECK_UPDATE(team->t.t_def_allocator, master_th->th.th_def_allocator); in __kmp_fork_call()
2126 KMP_DEBUG_ASSERT(master_th->th.th_task_team == in __kmp_fork_call()
2127 parent_team->t.t_task_team[master_th->th.th_task_state]); in __kmp_fork_call()
2131 master_th->th.th_task_team, parent_team, in __kmp_fork_call()
2132 team->t.t_task_team[master_th->th.th_task_state], team)); in __kmp_fork_call()
2134 if (active_level || master_th->th.th_task_team) { in __kmp_fork_call()
2136 KMP_DEBUG_ASSERT(master_th->th.th_task_state_memo_stack); in __kmp_fork_call()
2137 if (master_th->th.th_task_state_top >= in __kmp_fork_call()
2138 master_th->th.th_task_state_stack_sz) { // increase size in __kmp_fork_call()
2139 kmp_uint32 new_size = 2 * master_th->th.th_task_state_stack_sz; in __kmp_fork_call()
2143 for (i = 0; i < master_th->th.th_task_state_stack_sz; ++i) { in __kmp_fork_call()
2144 new_stack[i] = master_th->th.th_task_state_memo_stack[i]; in __kmp_fork_call()
2146 for (i = master_th->th.th_task_state_stack_sz; i < new_size; in __kmp_fork_call()
2150 old_stack = master_th->th.th_task_state_memo_stack; in __kmp_fork_call()
2151 master_th->th.th_task_state_memo_stack = new_stack; in __kmp_fork_call()
2152 master_th->th.th_task_state_stack_sz = new_size; in __kmp_fork_call()
2156 master_th->th in __kmp_fork_call()
2157 .th_task_state_memo_stack[master_th->th.th_task_state_top] = in __kmp_fork_call()
2158 master_th->th.th_task_state; in __kmp_fork_call()
2159 master_th->th.th_task_state_top++; in __kmp_fork_call()
2161 if (master_th->th.th_hot_teams && in __kmp_fork_call()
2163 team == master_th->th.th_hot_teams[active_level].hot_team) { in __kmp_fork_call()
2165 master_th->th.th_task_state = in __kmp_fork_call()
2166 master_th->th in __kmp_fork_call()
2167 .th_task_state_memo_stack[master_th->th.th_task_state_top]; in __kmp_fork_call()
2170 master_th->th.th_task_state = 0; in __kmp_fork_call()
2176 KMP_DEBUG_ASSERT((master_th->th.th_task_team == NULL) || in __kmp_fork_call()
2223 &master_th->th.th_current_task->td_icvs, loc); in __kmp_fork_call()
2226 master_th->th.ompt_thread_info.state = ompt_state_work_parallel; in __kmp_fork_call()
2234 && !master_th->th.th_teams_microtask // not in teams construct in __kmp_fork_call()
2245 master_th->th.th_frame_time = tmp_time; in __kmp_fork_call()
2260 KMP_DEBUG_ASSERT(team == __kmp_threads[gtid]->th.th_team); in __kmp_fork_call()
2307 master_th->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_fork_call()
2318 thread->th.ompt_thread_info.state = in __kmp_join_restore_state()
2360 root = master_th->th.th_root; in __kmp_join_call()
2361 team = master_th->th.th_team; in __kmp_join_call()
2364 master_th->th.th_ident = loc; in __kmp_join_call()
2368 master_th->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_join_call()
2377 team->t.t_task_team[master_th->th.th_task_state], in __kmp_join_call()
2378 master_th->th.th_task_team)); in __kmp_join_call()
2379 KMP_DEBUG_ASSERT(master_th->th.th_task_team == in __kmp_join_call()
2380 team->t.t_task_team[master_th->th.th_task_state]); in __kmp_join_call()
2386 if (master_th->th.th_teams_microtask) { in __kmp_join_call()
2389 int tlevel = master_th->th.th_teams_level; in __kmp_join_call()
2425 master_th->th.th_task_state = in __kmp_join_call()
2447 && !master_th->th.th_teams_microtask /* not in teams construct */ in __kmp_join_call()
2450 master_th->th.th_ident = loc; in __kmp_join_call()
2456 master_th->th.th_frame_time, 0, loc, in __kmp_join_call()
2457 master_th->th.th_team_nproc, 1); in __kmp_join_call()
2465 if (master_th->th.th_teams_microtask && !exit_teams && in __kmp_join_call()
2467 team->t.t_level == master_th->th.th_teams_level + 1) { in __kmp_join_call()
2478 if (master_th->th.th_team_nproc < master_th->th.th_teams_size.nth) { in __kmp_join_call()
2479 int old_num = master_th->th.th_team_nproc; in __kmp_join_call()
2480 int new_num = master_th->th.th_teams_size.nth; in __kmp_join_call()
2484 other_threads[i]->th.th_team_nproc = new_num; in __kmp_join_call()
2490 kmp_balign_t *balign = other_threads[i]->th.th_bar; in __kmp_join_call()
2500 other_threads[i]->th.th_task_state = master_th->th.th_task_state; in __kmp_join_call()
2517 master_th->th.th_info.ds.ds_tid = team->t.t_master_tid; in __kmp_join_call()
2518 master_th->th.th_local.this_construct = team->t.t_master_this_cons; in __kmp_join_call()
2520 master_th->th.th_dispatch = &parent_team->t.t_dispatch[team->t.t_master_tid]; in __kmp_join_call()
2528 if (!master_th->th.th_teams_microtask || in __kmp_join_call()
2529 team->t.t_level > master_th->th.th_teams_level) in __kmp_join_call()
2558 master_th->th.th_first_place = team->t.t_first_place; in __kmp_join_call()
2559 master_th->th.th_last_place = team->t.t_last_place; in __kmp_join_call()
2562 master_th->th.th_def_allocator = team->t.t_def_allocator; in __kmp_join_call()
2578 master_th->th.th_team = parent_team; in __kmp_join_call()
2579 master_th->th.th_team_nproc = parent_team->t.t_nproc; in __kmp_join_call()
2580 master_th->th.th_team_master = parent_team->t.t_threads[0]; in __kmp_join_call()
2581 master_th->th.th_team_serialized = parent_team->t.t_serialized; in __kmp_join_call()
2585 parent_team != master_th->th.th_serial_team && in __kmp_join_call()
2588 master_th->th.th_serial_team USE_NESTED_HOT_ARG(NULL)); in __kmp_join_call()
2589 master_th->th.th_serial_team = parent_team; in __kmp_join_call()
2593 if (master_th->th.th_task_state_top > in __kmp_join_call()
2595 KMP_DEBUG_ASSERT(master_th->th.th_task_state_memo_stack); in __kmp_join_call()
2597 master_th->th.th_task_state_memo_stack[master_th->th.th_task_state_top] = in __kmp_join_call()
2598 master_th->th.th_task_state; in __kmp_join_call()
2599 --master_th->th.th_task_state_top; // pop in __kmp_join_call()
2601 master_th->th.th_task_state = in __kmp_join_call()
2602 master_th->th in __kmp_join_call()
2603 .th_task_state_memo_stack[master_th->th.th_task_state_top]; in __kmp_join_call()
2606 master_th->th.th_task_team = in __kmp_join_call()
2607 parent_team->t.t_task_team[master_th->th.th_task_state]; in __kmp_join_call()
2610 __kmp_gtid_from_thread(master_th), master_th->th.th_task_team, in __kmp_join_call()
2617 master_th->th.th_current_task->td_flags.executing = 1; in __kmp_join_call()
2636 if (thread->th.th_team != thread->th.th_serial_team) { in __kmp_save_internal_controls()
2639 if (thread->th.th_team->t.t_serialized > 1) { in __kmp_save_internal_controls()
2642 if (thread->th.th_team->t.t_control_stack_top == NULL) { in __kmp_save_internal_controls()
2645 if (thread->th.th_team->t.t_control_stack_top->serial_nesting_level != in __kmp_save_internal_controls()
2646 thread->th.th_team->t.t_serialized) { in __kmp_save_internal_controls()
2655 copy_icvs(control, &thread->th.th_current_task->td_icvs); in __kmp_save_internal_controls()
2657 control->serial_nesting_level = thread->th.th_team->t.t_serialized; in __kmp_save_internal_controls()
2659 control->next = thread->th.th_team->t.t_control_stack_top; in __kmp_save_internal_controls()
2660 thread->th.th_team->t.t_control_stack_top = control; in __kmp_save_internal_controls()
2680 if (thread->th.th_current_task->td_icvs.nproc == new_nth) in __kmp_set_num_threads()
2690 root = thread->th.th_root; in __kmp_set_num_threads()
2708 hot_team->t.t_threads[f]->th.th_task_team = NULL; in __kmp_set_num_threads()
2715 if (thread->th.th_hot_teams) { in __kmp_set_num_threads()
2716 KMP_DEBUG_ASSERT(hot_team == thread->th.th_hot_teams[0].hot_team); in __kmp_set_num_threads()
2717 thread->th.th_hot_teams[0].hot_team_nth = new_nth; in __kmp_set_num_threads()
2726 hot_team->t.t_threads[f]->th.th_team_nproc = new_nth; in __kmp_set_num_threads()
2786 KMP_DEBUG_ASSERT(thread->th.th_current_task); in __kmp_get_max_active_levels()
2789 gtid, thread->th.th_current_task, in __kmp_get_max_active_levels()
2790 thread->th.th_current_task->td_icvs.max_active_levels)); in __kmp_get_max_active_levels()
2791 return thread->th.th_current_task->td_icvs.max_active_levels; in __kmp_get_max_active_levels()
2825 thread->th.th_current_task->td_icvs.sched.r_sched_type = kmp_sch_static; in __kmp_set_schedule()
2827 thread->th.th_current_task->td_icvs.sched.r_sched_type = in __kmp_set_schedule()
2833 thread->th.th_current_task->td_icvs.sched.r_sched_type = in __kmp_set_schedule()
2839 thread->th.th_current_task->td_icvs.sched.chunk = KMP_DEFAULT_CHUNK; in __kmp_set_schedule()
2841 thread->th.th_current_task->td_icvs.sched.chunk = chunk; in __kmp_set_schedule()
2855 th_type = thread->th.th_current_task->td_icvs.sched.r_sched_type; in __kmp_get_schedule()
2890 *chunk = thread->th.th_current_task->td_icvs.sched.chunk; in __kmp_get_schedule()
2908 team = thr->th.th_team; in __kmp_get_ancestor_thread_num()
2914 if (thr->th.th_teams_microtask) { in __kmp_get_ancestor_thread_num()
2916 int tlevel = thr->th.th_teams_level; // the level of the teams construct in __kmp_get_ancestor_thread_num()
2968 team = thr->th.th_team; in __kmp_get_team_size()
2974 if (thr->th.th_teams_microtask) { in __kmp_get_team_size()
2976 int tlevel = thr->th.th_teams_level; // the level of the teams construct in __kmp_get_team_size()
3188 copy_icvs(&gx_icvs, &team->t.t_threads[0]->th.th_current_task->td_icvs); in __kmp_get_x_global_icvs()
3359 __kmp_printf("%2d %p\n", thread->th.th_info.ds.ds_gtid, thread); in __kmp_print_structure_thread()
3400 __kmp_printf(" Our Root: %p\n", thread->th.th_root); in __kmp_print_structure()
3401 __kmp_print_structure_team(" Our Team: ", thread->th.th_team); in __kmp_print_structure()
3403 thread->th.th_serial_team); in __kmp_print_structure()
3404 __kmp_printf(" Threads: %2d\n", thread->th.th_team_nproc); in __kmp_print_structure()
3406 thread->th.th_team_master); in __kmp_print_structure()
3407 __kmp_printf(" Serialized?: %2d\n", thread->th.th_team_serialized); in __kmp_print_structure()
3408 __kmp_printf(" Set NProc: %2d\n", thread->th.th_set_nproc); in __kmp_print_structure()
3410 __kmp_printf(" Set Proc Bind: %2d\n", thread->th.th_set_proc_bind); in __kmp_print_structure()
3413 thread->th.th_next_pool); in __kmp_print_structure()
3415 __kmp_print_structure_team_accum(list, thread->th.th_team); in __kmp_print_structure()
3416 __kmp_print_structure_team_accum(list, thread->th.th_serial_team); in __kmp_print_structure()
3507 unsigned x = thread->th.th_x; in __kmp_get_random()
3510 thread->th.th_x = x * thread->th.th_a + 1; in __kmp_get_random()
3513 thread->th.th_info.ds.ds_tid, r)); in __kmp_get_random()
3520 unsigned seed = thread->th.th_info.ds.ds_tid; in __kmp_init_random()
3522 thread->th.th_a = in __kmp_init_random()
3524 thread->th.th_x = (seed + 1) * thread->th.th_a + 1; in __kmp_init_random()
3526 ("__kmp_init_random: THREAD: %u; A: %u\n", seed, thread->th.th_a)); in __kmp_init_random()
3755 root_thread->th.th_info.ds.ds_gtid = gtid; in __kmp_register_root()
3757 root_thread->th.ompt_thread_info.thread_data = ompt_data_none; in __kmp_register_root()
3759 root_thread->th.th_root = root; in __kmp_register_root()
3761 root_thread->th.th_cons = __kmp_allocate_cons_stack(gtid); in __kmp_register_root()
3768 KMP_DEBUG_ASSERT(root_thread->th.th_local.bget_data == NULL); in __kmp_register_root()
3775 if (!root_thread->th.th_serial_team) { in __kmp_register_root()
3778 root_thread->th.th_serial_team = in __kmp_register_root()
3788 KMP_ASSERT(root_thread->th.th_serial_team); in __kmp_register_root()
3790 root_thread->th.th_serial_team)); in __kmp_register_root()
3797 root_thread->th.th_serial_team->t.t_threads[0] = root_thread; in __kmp_register_root()
3799 root_thread->th.th_serial_team->t.t_serialized = 0; in __kmp_register_root()
3827 root_thread->th.th_bar[b].bb.b_arrived = KMP_INIT_BARRIER_STATE; in __kmp_register_root()
3829 root_thread->th.th_bar[b].bb.b_worker_arrived = 0; in __kmp_register_root()
3838 root_thread->th.th_current_place = KMP_PLACE_UNDEFINED; in __kmp_register_root()
3839 root_thread->th.th_new_place = KMP_PLACE_UNDEFINED; in __kmp_register_root()
3840 root_thread->th.th_first_place = KMP_PLACE_UNDEFINED; in __kmp_register_root()
3841 root_thread->th.th_last_place = KMP_PLACE_UNDEFINED; in __kmp_register_root()
3848 root_thread->th.th_def_allocator = __kmp_def_allocator; in __kmp_register_root()
3849 root_thread->th.th_prev_level = 0; in __kmp_register_root()
3850 root_thread->th.th_prev_num_threads = 1; in __kmp_register_root()
3888 kmp_hot_team_ptr_t *hot_teams = thr->th.th_hot_teams; in __kmp_free_hot_teams()
3898 kmp_info_t *th = team->t.t_threads[i]; in __kmp_free_hot_teams() local
3899 n += __kmp_free_hot_teams(root, th, level + 1, max_level); in __kmp_free_hot_teams()
3900 if (i > 0 && th->th.th_hot_teams) { in __kmp_free_hot_teams()
3901 __kmp_free(th->th.th_hot_teams); in __kmp_free_hot_teams()
3902 th->th.th_hot_teams = NULL; in __kmp_free_hot_teams()
3930 kmp_info_t *th = hot_team->t.t_threads[i]; in __kmp_reset_root() local
3932 n += __kmp_free_hot_teams(root, th, 1, __kmp_hot_teams_max_level); in __kmp_reset_root()
3934 if (th->th.th_hot_teams) { in __kmp_reset_root()
3935 __kmp_free(th->th.th_hot_teams); in __kmp_reset_root()
3936 th->th.th_hot_teams = NULL; in __kmp_reset_root()
3955 (LPVOID) & (root->r.r_uber_thread->th), in __kmp_reset_root()
3956 root->r.r_uber_thread->th.th_info.ds.ds_thread)); in __kmp_reset_root()
3957 __kmp_free_handle(root->r.r_uber_thread->th.th_info.ds.ds_thread); in __kmp_reset_root()
3963 &(root->r.r_uber_thread->th.ompt_thread_info.thread_data)); in __kmp_reset_root()
3999 KMP_ASSERT(root == __kmp_threads[gtid]->th.th_root); in __kmp_unregister_root_current_thread()
4006 kmp_team_t *team = thread->th.th_team; in __kmp_unregister_root_current_thread()
4007 kmp_task_team_t *task_team = thread->th.th_task_team; in __kmp_unregister_root_current_thread()
4013 thread->th.ompt_thread_info.state = ompt_state_undefined; in __kmp_unregister_root_current_thread()
4045 KMP_ASSERT(root == __kmp_threads[gtid]->th.th_root); in __kmp_unregister_root_other_thread()
4061 kmp_team_t *steam = this_thr->th.th_serial_team; in __kmp_task_info()
4062 kmp_team_t *team = this_thr->th.th_team; in __kmp_task_info()
4067 gtid, tid, this_thr, team, steam, this_thr->th.th_current_task, in __kmp_task_info()
4082 KMP_DEBUG_ASSERT(this_thr->th.th_serial_team); in __kmp_initialize_info()
4087 KMP_DEBUG_ASSERT(master->th.th_root); in __kmp_initialize_info()
4091 TCW_SYNC_PTR(this_thr->th.th_team, team); in __kmp_initialize_info()
4093 this_thr->th.th_info.ds.ds_tid = tid; in __kmp_initialize_info()
4094 this_thr->th.th_set_nproc = 0; in __kmp_initialize_info()
4098 this_thr->th.th_reap_state = KMP_NOT_SAFE_TO_REAP; in __kmp_initialize_info()
4100 this_thr->th.th_reap_state = KMP_SAFE_TO_REAP; in __kmp_initialize_info()
4102 this_thr->th.th_set_proc_bind = proc_bind_default; in __kmp_initialize_info()
4104 this_thr->th.th_new_place = this_thr->th.th_current_place; in __kmp_initialize_info()
4107 this_thr->th.th_root = master->th.th_root; in __kmp_initialize_info()
4110 this_thr->th.th_team_nproc = team->t.t_nproc; in __kmp_initialize_info()
4111 this_thr->th.th_team_master = master; in __kmp_initialize_info()
4112 this_thr->th.th_team_serialized = team->t.t_serialized; in __kmp_initialize_info()
4113 TCW_PTR(this_thr->th.th_sleep_loc, NULL); in __kmp_initialize_info()
4118 tid, gtid, this_thr, this_thr->th.th_current_task)); in __kmp_initialize_info()
4120 __kmp_init_implicit_task(this_thr->th.th_team_master->th.th_ident, this_thr, in __kmp_initialize_info()
4124 tid, gtid, this_thr, this_thr->th.th_current_task)); in __kmp_initialize_info()
4129 this_thr->th.th_dispatch = &team->t.t_dispatch[tid]; in __kmp_initialize_info()
4131 this_thr->th.th_local.this_construct = 0; in __kmp_initialize_info()
4133 if (!this_thr->th.th_pri_common) { in __kmp_initialize_info()
4134 this_thr->th.th_pri_common = in __kmp_initialize_info()
4138 gtid, this_thr->th.th_pri_common, this_thr->th.th_pri_common + 1, in __kmp_initialize_info()
4141 this_thr->th.th_pri_head = NULL; in __kmp_initialize_info()
4146 volatile kmp_disp_t *dispatch = this_thr->th.th_dispatch; in __kmp_initialize_info()
4186 this_thr->th.th_next_pool = NULL; in __kmp_initialize_info()
4188 if (!this_thr->th.th_task_state_memo_stack) { in __kmp_initialize_info()
4190 this_thr->th.th_task_state_memo_stack = in __kmp_initialize_info()
4192 this_thr->th.th_task_state_top = 0; in __kmp_initialize_info()
4193 this_thr->th.th_task_state_stack_sz = 4; in __kmp_initialize_info()
4194 for (i = 0; i < this_thr->th.th_task_state_stack_sz; in __kmp_initialize_info()
4196 this_thr->th.th_task_state_memo_stack[i] = 0; in __kmp_initialize_info()
4199 KMP_DEBUG_ASSERT(!this_thr->th.th_spin_here); in __kmp_initialize_info()
4200 KMP_DEBUG_ASSERT(this_thr->th.th_next_waiting == 0); in __kmp_initialize_info()
4227 __kmp_thread_pool = (volatile kmp_info_t *)new_thr->th.th_next_pool; in __kmp_allocate_thread()
4231 TCW_4(new_thr->th.th_in_pool, FALSE); in __kmp_allocate_thread()
4237 __kmp_get_gtid(), new_thr->th.th_info.ds.ds_gtid)); in __kmp_allocate_thread()
4238 KMP_ASSERT(!new_thr->th.th_team); in __kmp_allocate_thread()
4244 new_thr->th.th_info.ds.ds_gtid); in __kmp_allocate_thread()
4245 KMP_DEBUG_ASSERT(new_thr->th.th_serial_team); in __kmp_allocate_thread()
4250 new_thr->th.th_task_state = 0; in __kmp_allocate_thread()
4251 new_thr->th.th_task_state_top = 0; in __kmp_allocate_thread()
4252 new_thr->th.th_task_state_stack_sz = 4; in __kmp_allocate_thread()
4268 kmp_balign_t *balign = new_thr->th.th_bar; in __kmp_allocate_thread()
4274 __kmp_get_gtid(), new_thr, new_thr->th.th_info.ds.ds_gtid)); in __kmp_allocate_thread()
4332 new_thr->th.th_serial_team = serial_team = in __kmp_allocate_thread()
4358 KMP_DEBUG_ASSERT(new_thr->th.th_local.bget_data == NULL); in __kmp_allocate_thread()
4370 kmp_balign_t *balign = new_thr->th.th_bar; in __kmp_allocate_thread()
4378 new_thr->th.th_spin_here = FALSE; in __kmp_allocate_thread()
4379 new_thr->th.th_next_waiting = 0; in __kmp_allocate_thread()
4381 new_thr->th.th_blocking = false; in __kmp_allocate_thread()
4385 new_thr->th.th_current_place = KMP_PLACE_UNDEFINED; in __kmp_allocate_thread()
4386 new_thr->th.th_new_place = KMP_PLACE_UNDEFINED; in __kmp_allocate_thread()
4387 new_thr->th.th_first_place = KMP_PLACE_UNDEFINED; in __kmp_allocate_thread()
4388 new_thr->th.th_last_place = KMP_PLACE_UNDEFINED; in __kmp_allocate_thread()
4391 new_thr->th.th_def_allocator = __kmp_def_allocator; in __kmp_allocate_thread()
4392 new_thr->th.th_prev_level = 0; in __kmp_allocate_thread()
4393 new_thr->th.th_prev_num_threads = 1; in __kmp_allocate_thread()
4396 TCW_4(new_thr->th.th_in_pool, FALSE); in __kmp_allocate_thread()
4397 new_thr->th.th_active_in_pool = FALSE; in __kmp_allocate_thread()
4398 TCW_4(new_thr->th.th_active, TRUE); in __kmp_allocate_thread()
4554 int first_place = master_th->th.th_first_place; in __kmp_partition_places()
4555 int last_place = master_th->th.th_last_place; in __kmp_partition_places()
4556 int masters_place = master_th->th.th_current_place; in __kmp_partition_places()
4577 kmp_info_t *th = team->t.t_threads[f]; in __kmp_partition_places() local
4578 KMP_DEBUG_ASSERT(th != NULL); in __kmp_partition_places()
4579 th->th.th_first_place = first_place; in __kmp_partition_places()
4580 th->th.th_last_place = last_place; in __kmp_partition_places()
4581 th->th.th_new_place = masters_place; in __kmp_partition_places()
4583 if (__kmp_display_affinity && masters_place != th->th.th_current_place && in __kmp_partition_places()
4608 kmp_info_t *th = team->t.t_threads[f]; in __kmp_partition_places() local
4609 KMP_DEBUG_ASSERT(th != NULL); in __kmp_partition_places()
4618 th->th.th_first_place = first_place; in __kmp_partition_places()
4619 th->th.th_last_place = last_place; in __kmp_partition_places()
4620 th->th.th_new_place = place; in __kmp_partition_places()
4622 if (__kmp_display_affinity && place != th->th.th_current_place && in __kmp_partition_places()
4642 kmp_info_t *th = team->t.t_threads[f]; in __kmp_partition_places() local
4643 KMP_DEBUG_ASSERT(th != NULL); in __kmp_partition_places()
4645 th->th.th_first_place = first_place; in __kmp_partition_places()
4646 th->th.th_last_place = last_place; in __kmp_partition_places()
4647 th->th.th_new_place = place; in __kmp_partition_places()
4649 if (__kmp_display_affinity && place != th->th.th_current_place && in __kmp_partition_places()
4686 th->th.th_new_place, first_place, last_place)); in __kmp_partition_places()
4717 kmp_info_t *th = team->t.t_threads[f]; in __kmp_partition_places() local
4718 KMP_DEBUG_ASSERT(th != NULL); in __kmp_partition_places()
4720 th->th.th_first_place = place; in __kmp_partition_places()
4721 th->th.th_new_place = place; in __kmp_partition_places()
4723 if (__kmp_display_affinity && place != th->th.th_current_place && in __kmp_partition_places()
4750 th->th.th_last_place = place; in __kmp_partition_places()
4765 f, th->th.th_new_place, th->th.th_first_place, in __kmp_partition_places()
4766 th->th.th_last_place, __kmp_affinity_num_masks)); in __kmp_partition_places()
4776 kmp_info_t *th; in __kmp_partition_places() local
4814 th = team->t.t_threads[f]; in __kmp_partition_places()
4815 KMP_DEBUG_ASSERT(th); in __kmp_partition_places()
4816 th->th.th_first_place = first; in __kmp_partition_places()
4817 th->th.th_new_place = place; in __kmp_partition_places()
4818 th->th.th_last_place = last; in __kmp_partition_places()
4820 if (__kmp_display_affinity && place != th->th.th_current_place && in __kmp_partition_places()
4829 team->t.t_id, f, th->th.th_new_place, in __kmp_partition_places()
4830 th->th.th_first_place, th->th.th_last_place, spacing)); in __kmp_partition_places()
4847 kmp_info_t *th = team->t.t_threads[f]; in __kmp_partition_places() local
4848 KMP_DEBUG_ASSERT(th != NULL); in __kmp_partition_places()
4850 th->th.th_first_place = place; in __kmp_partition_places()
4851 th->th.th_last_place = place; in __kmp_partition_places()
4852 th->th.th_new_place = place; in __kmp_partition_places()
4854 if (__kmp_display_affinity && place != th->th.th_current_place && in __kmp_partition_places()
4890 team->t.t_id, f, th->th.th_new_place, in __kmp_partition_places()
4891 th->th.th_first_place, th->th.th_last_place)); in __kmp_partition_places()
4932 team = master->th.th_team; in __kmp_allocate_team()
4934 if (master->th.th_teams_microtask) { // in teams construct? in __kmp_allocate_team()
4935 if (master->th.th_teams_size.nteams > 1 && in __kmp_allocate_team()
4939 master->th.th_teams_level < in __kmp_allocate_team()
4945 hot_teams = master->th.th_hot_teams; in __kmp_allocate_team()
4990 root->r.r_uber_thread->th.th_ident); in __kmp_allocate_team()
5035 team->t.t_threads[f]->th.th_task_team = NULL; in __kmp_allocate_team()
5047 kmp_balign_t *balign = team->t.t_threads[f]->th.th_bar; in __kmp_allocate_team()
5061 root->r.r_uber_thread->th.th_ident); in __kmp_allocate_team()
5065 team->t.t_threads[f]->th.th_team_nproc = new_nproc; in __kmp_allocate_team()
5077 team->t.t_threads[f]->th.th_team_nproc == in __kmp_allocate_team()
5111 kmp_balign_t *balign = other_threads[f]->th.th_bar; in __kmp_allocate_team()
5161 kmp_balign_t *balign = new_worker->th.th_bar; in __kmp_allocate_team()
5187 root->r.r_uber_thread->th.th_ident); in __kmp_allocate_team()
5201 team->t.t_threads[f]->th.th_task_state = in __kmp_allocate_team()
5202 team->t.t_threads[0]->th.th_task_state_memo_stack[level]; in __kmp_allocate_team()
5205 team->t.t_threads[0]->th.th_task_state; // copy master's state in __kmp_allocate_team()
5207 team->t.t_threads[f]->th.th_task_state = old_state; in __kmp_allocate_team()
5213 team->t.t_threads[f]->th.th_team_nproc == in __kmp_allocate_team()
5228 if (master->th.th_teams_microtask) { in __kmp_allocate_team()
5232 thr->th.th_teams_microtask = master->th.th_teams_microtask; in __kmp_allocate_team()
5233 thr->th.th_teams_level = master->th.th_teams_level; in __kmp_allocate_team()
5234 thr->th.th_teams_size = master->th.th_teams_size; in __kmp_allocate_team()
5245 kmp_balign_t *balign = thr->th.th_bar; in __kmp_allocate_team()
5425 if (master->th.th_teams_microtask) { // in teams construct? in __kmp_free_team()
5426 if (master->th.th_teams_size.nteams > 1) { in __kmp_free_team()
5431 master->th.th_teams_level == team->t.t_level) { in __kmp_free_team()
5436 hot_teams = master->th.th_hot_teams; in __kmp_free_team()
5458 kmp_info_t *th = team->t.t_threads[f]; in __kmp_free_team() local
5459 volatile kmp_uint32 *state = &th->th.th_reap_state; in __kmp_free_team()
5464 if (!__kmp_is_thread_alive(th, &ecode)) { in __kmp_free_team()
5470 kmp_flag_64 fl(&th->th.th_bar[bs_forkjoin_barrier].bb.b_go, th); in __kmp_free_team()
5472 fl.resume(__kmp_gtid_from_thread(th)); in __kmp_free_team()
5484 team->t.t_threads[f]->th.th_task_team = NULL; in __kmp_free_team()
5569 kmp_root_t *root = this_th->th.th_root; in __kmp_free_thread()
5572 __kmp_get_gtid(), this_th->th.th_info.ds.ds_gtid)); in __kmp_free_thread()
5579 kmp_balign_t *balign = this_th->th.th_bar; in __kmp_free_thread()
5586 this_th->th.th_task_state = 0; in __kmp_free_thread()
5587 this_th->th.th_reap_state = KMP_SAFE_TO_REAP; in __kmp_free_thread()
5590 TCW_PTR(this_th->th.th_team, NULL); in __kmp_free_thread()
5591 TCW_PTR(this_th->th.th_root, NULL); in __kmp_free_thread()
5592 TCW_PTR(this_th->th.th_dispatch, NULL); /* NOT NEEDED */ in __kmp_free_thread()
5600 this_th->th.th_current_task = NULL; in __kmp_free_thread()
5604 gtid = this_th->th.th_info.ds.ds_gtid; in __kmp_free_thread()
5607 if (__kmp_thread_pool_insert_pt->th.th_info.ds.ds_gtid > gtid) { in __kmp_free_thread()
5618 scan = &(__kmp_thread_pool_insert_pt->th.th_next_pool); in __kmp_free_thread()
5622 for (; (*scan != NULL) && ((*scan)->th.th_info.ds.ds_gtid < gtid); in __kmp_free_thread()
5623 scan = &((*scan)->th.th_next_pool)) in __kmp_free_thread()
5628 TCW_PTR(this_th->th.th_next_pool, *scan); in __kmp_free_thread()
5630 KMP_DEBUG_ASSERT((this_th->th.th_next_pool == NULL) || in __kmp_free_thread()
5631 (this_th->th.th_info.ds.ds_gtid < in __kmp_free_thread()
5632 this_th->th.th_next_pool->th.th_info.ds.ds_gtid)); in __kmp_free_thread()
5633 TCW_4(this_th->th.th_in_pool, TRUE); in __kmp_free_thread()
5656 int gtid = this_thr->th.th_info.ds.ds_gtid; in __kmp_launch_thread()
5664 this_thr->th.th_cons = __kmp_allocate_cons_stack(gtid); // ATT: Memory leak? in __kmp_launch_thread()
5670 thread_data = &(this_thr->th.ompt_thread_info.thread_data); in __kmp_launch_thread()
5673 this_thr->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_launch_thread()
5674 this_thr->th.ompt_thread_info.wait_id = 0; in __kmp_launch_thread()
5675 this_thr->th.ompt_thread_info.idle_frame = OMPT_GET_FRAME_ADDRESS(0); in __kmp_launch_thread()
5685 this_thr->th.ompt_thread_info.state = ompt_state_idle; in __kmp_launch_thread()
5701 this_thr->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_launch_thread()
5705 pteam = (kmp_team_t * (*))(&this_thr->th.th_team); in __kmp_launch_thread()
5721 this_thr->th.ompt_thread_info.state = ompt_state_work_parallel; in __kmp_launch_thread()
5738 this_thr->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_launch_thread()
5753 this_thr->th.th_task_team = NULL; in __kmp_launch_thread()
5851 gtid = thread->th.th_info.ds.ds_gtid; in __kmp_reap_thread()
5863 kmp_flag_64 flag(&thread->th.th_bar[bs_forkjoin_barrier].bb.b_go, thread); in __kmp_reap_thread()
5880 if (thread->th.th_active_in_pool) { in __kmp_reap_thread()
5881 thread->th.th_active_in_pool = FALSE; in __kmp_reap_thread()
5919 if (thread->th.th_cons) { in __kmp_reap_thread()
5920 __kmp_free_cons_stack(thread->th.th_cons); in __kmp_reap_thread()
5921 thread->th.th_cons = NULL; in __kmp_reap_thread()
5925 if (thread->th.th_pri_common != NULL) { in __kmp_reap_thread()
5926 __kmp_free(thread->th.th_pri_common); in __kmp_reap_thread()
5927 thread->th.th_pri_common = NULL; in __kmp_reap_thread()
5930 if (thread->th.th_task_state_memo_stack != NULL) { in __kmp_reap_thread()
5931 __kmp_free(thread->th.th_task_state_memo_stack); in __kmp_reap_thread()
5932 thread->th.th_task_state_memo_stack = NULL; in __kmp_reap_thread()
5936 if (thread->th.th_local.bget_data != NULL) { in __kmp_reap_thread()
5942 if (thread->th.th_affin_mask != NULL) { in __kmp_reap_thread()
5943 KMP_CPU_FREE(thread->th.th_affin_mask); in __kmp_reap_thread()
5944 thread->th.th_affin_mask = NULL; in __kmp_reap_thread()
5949 if (thread->th.th_hier_bar_data != NULL) { in __kmp_reap_thread()
5950 __kmp_free(thread->th.th_hier_bar_data); in __kmp_reap_thread()
5951 thread->th.th_hier_bar_data = NULL; in __kmp_reap_thread()
5955 __kmp_reap_team(thread->th.th_serial_team); in __kmp_reap_thread()
5956 thread->th.th_serial_team = NULL; in __kmp_reap_thread()
6025 __kmp_thread_pool = thread->th.th_next_pool; in __kmp_internal_end()
6027 KMP_DEBUG_ASSERT(thread->th.th_reap_state == KMP_SAFE_TO_REAP); in __kmp_internal_end()
6028 thread->th.th_next_pool = NULL; in __kmp_internal_end()
6029 thread->th.th_in_pool = FALSE; in __kmp_internal_end()
6053 while (thr && KMP_ATOMIC_LD_ACQ(&thr->th.th_blocking)) in __kmp_internal_end()
6257 __kmp_threads[gtid]->th.th_task_team = NULL; in __kmp_internal_end_thread()
6856 if (thread->th.th_current_task->td_icvs.nproc != 0) in __kmp_do_middle_initialize()
6976 this_thr->th.th_local.this_construct = 0; in __kmp_run_before_invoked_task()
6978 KMP_CACHE_PREFETCH(&this_thr->th.th_bar[bs_forkjoin_barrier].bb.b_arrived); in __kmp_run_before_invoked_task()
6980 dispatch = (kmp_disp_t *)TCR_PTR(this_thr->th.th_dispatch); in __kmp_run_before_invoked_task()
7009 kmp_team_t *team = this_thr->th.th_team; in __kmp_invoke_task_func()
7081 kmp_team_t *team = thr->th.th_team; in __kmp_teams_master()
7083 thr->th.th_set_nproc = thr->th.th_teams_size.nth; in __kmp_teams_master()
7084 KMP_DEBUG_ASSERT(thr->th.th_teams_microtask); in __kmp_teams_master()
7085 KMP_DEBUG_ASSERT(thr->th.th_set_nproc); in __kmp_teams_master()
7087 __kmp_tid_from_gtid(gtid), thr->th.th_teams_microtask)); in __kmp_teams_master()
7094 (microtask_t)thr->th.th_teams_microtask, // "wrapped" task in __kmp_teams_master()
7113 kmp_team_t *team = this_thr->th.th_team; in __kmp_invoke_teams_master()
7115 if (!__kmp_threads[gtid]->th.th_team->t.t_serialized) in __kmp_invoke_teams_master()
7116 KMP_DEBUG_ASSERT((void *)__kmp_threads[gtid]->th.th_team->t.t_pkfn == in __kmp_invoke_teams_master()
7135 thr->th.th_set_nproc = num_threads; in __kmp_push_num_threads()
7161 thr->th.th_set_nproc = thr->th.th_teams_size.nteams = num_teams; in __kmp_push_num_teams()
7184 thr->th.th_teams_size.nth = num_threads; in __kmp_push_num_teams()
7190 thr->th.th_set_proc_bind = proc_bind; in __kmp_push_proc_bind()
7205 KMP_DEBUG_ASSERT(this_thr->th.th_team == team); in __kmp_internal_fork()
7231 KMP_ASSERT(this_thr->th.th_team == team); in __kmp_internal_fork()
7236 team->t.t_threads[f]->th.th_team_nproc == team->t.t_nproc); in __kmp_internal_fork()
7248 KMP_DEBUG_ASSERT(this_thr->th.th_team == team); in __kmp_internal_join()
7256 __kmp_threads[gtid]->th.th_team_nproc != team->t.t_nproc) { in __kmp_internal_join()
7261 gtid, __kmp_threads[gtid]->th.th_team_nproc, team, in __kmp_internal_join()
7266 __kmp_threads[gtid]->th.th_team_nproc == team->t.t_nproc); in __kmp_internal_join()
7272 this_thr->th.ompt_thread_info.state == ompt_state_wait_barrier_implicit) { in __kmp_internal_join()
7273 int ds_tid = this_thr->th.th_info.ds.ds_tid; in __kmp_internal_join()
7275 this_thr->th.ompt_thread_info.state = ompt_state_overhead; in __kmp_internal_join()
7300 KMP_ASSERT(this_thr->th.th_team == team); in __kmp_internal_join()
7325 if (hot_team->t.t_threads[i]->th.th_active) { in __kmp_active_hot_team_nproc()
7345 ->th.th_current_task->td_icvs.dynamic == TRUE); in __kmp_load_balance_nproc()
7530 root = __kmp_threads[gtid]->th.th_root; in __kmp_internal_begin()
7558 root = thread->th.th_root; in __kmp_user_set_library()
7570 thread->th.th_set_nproc = 0; in __kmp_user_set_library()
7574 thread->th.th_set_nproc = 0; in __kmp_user_set_library()
7579 thread->th.th_set_nproc = 0; in __kmp_user_set_library()
7646 if (thr->th.th_teams_microtask) { in __kmp_aux_get_team_info()
7647 kmp_team_t *team = thr->th.th_team; in __kmp_aux_get_team_info()
7648 int tlevel = thr->th.th_teams_level; // the level of the teams construct in __kmp_aux_get_team_info()
7753 static int __kmp_aux_capture_affinity_field(int gtid, const kmp_info_t *th, in __kmp_aux_capture_affinity_field() argument
7764 KMP_DEBUG_ASSERT(th); in __kmp_aux_capture_affinity_field()
7864 rc = __kmp_str_buf_print(field_buffer, format, th->th.th_team->t.t_level); in __kmp_aux_capture_affinity_field()
7882 rc = __kmp_str_buf_print(field_buffer, format, th->th.th_team->t.t_nproc); in __kmp_aux_capture_affinity_field()
7886 __kmp_get_ancestor_thread_num(gtid, th->th.th_team->t.t_level - 1); in __kmp_aux_capture_affinity_field()
7893 __kmp_affinity_str_buf_mask(&buf, th->th.th_affin_mask); in __kmp_aux_capture_affinity_field()
7926 const kmp_info_t *th; in __kmp_aux_capture_affinity() local
7935 th = __kmp_threads[gtid]; in __kmp_aux_capture_affinity()
7950 int rc = __kmp_aux_capture_affinity_field(gtid, th, &parse_ptr, &field); in __kmp_aux_capture_affinity()
7991 set__blocktime_team(thread->th.th_team, tid, blocktime); in __kmp_aux_set_blocktime()
7992 set__blocktime_team(thread->th.th_serial_team, 0, blocktime); in __kmp_aux_set_blocktime()
7998 set__bt_intervals_team(thread->th.th_team, tid, bt_intervals); in __kmp_aux_set_blocktime()
7999 set__bt_intervals_team(thread->th.th_serial_team, 0, bt_intervals); in __kmp_aux_set_blocktime()
8005 set__bt_set_team(thread->th.th_team, tid, bt_set); in __kmp_aux_set_blocktime()
8006 set__bt_set_team(thread->th.th_serial_team, 0, bt_set); in __kmp_aux_set_blocktime()
8010 __kmp_gtid_from_tid(tid, thread->th.th_team), in __kmp_aux_set_blocktime()
8011 thread->th.th_team->t.t_id, tid, blocktime, bt_intervals, in __kmp_aux_set_blocktime()
8015 __kmp_gtid_from_tid(tid, thread->th.th_team), in __kmp_aux_set_blocktime()
8016 thread->th.th_team->t.t_id, tid, blocktime)); in __kmp_aux_set_blocktime()
8191 return ((__kmp_entry_thread()->th.th_local.packed_reduction_method) >> 8); in __kmp_get_reduce_method()