Lines Matching refs:team

75   struct gomp_team *team = thr->ts.team;  in gomp_work_share_start()  local
80 if (team == NULL) in gomp_work_share_start()
89 gomp_mutex_lock (&team->work_share_lock); in gomp_work_share_start()
96 if (ws_gen - team->oldest_live_gen < team->num_live_gen) in gomp_work_share_start()
98 ws_index = ws_gen & team->generation_mask; in gomp_work_share_start()
99 ws = team->work_shares[ws_index]; in gomp_work_share_start()
104 gomp_mutex_unlock (&team->work_share_lock); in gomp_work_share_start()
110 if (team->num_live_gen++ == team->generation_mask) in gomp_work_share_start()
112 team->work_shares = gomp_realloc (team->work_shares, in gomp_work_share_start()
113 2 * team->num_live_gen in gomp_work_share_start()
114 * sizeof (*team->work_shares)); in gomp_work_share_start()
120 if (team->oldest_live_gen > 0) in gomp_work_share_start()
121 memcpy (team->work_shares + team->num_live_gen, in gomp_work_share_start()
122 team->work_shares, in gomp_work_share_start()
123 (team->oldest_live_gen & team->generation_mask) in gomp_work_share_start()
124 * sizeof (*team->work_shares)); in gomp_work_share_start()
126 team->generation_mask = team->generation_mask * 2 + 1; in gomp_work_share_start()
129 ws_index = ws_gen & team->generation_mask; in gomp_work_share_start()
130 ws = gomp_new_work_share (ordered, team->nthreads); in gomp_work_share_start()
133 team->work_shares[ws_index] = ws; in gomp_work_share_start()
136 gomp_mutex_unlock (&team->work_share_lock); in gomp_work_share_start()
149 struct gomp_team *team = thr->ts.team; in gomp_work_share_end() local
156 if (team == NULL) in gomp_work_share_end()
162 last = gomp_barrier_wait_start (&team->barrier); in gomp_work_share_end()
168 ws_index = thr->ts.work_share_generation & team->generation_mask; in gomp_work_share_end()
169 team->work_shares[ws_index] = NULL; in gomp_work_share_end()
170 team->oldest_live_gen++; in gomp_work_share_end()
171 team->num_live_gen = 0; in gomp_work_share_end()
176 gomp_barrier_wait_end (&team->barrier, last); in gomp_work_share_end()
187 struct gomp_team *team = thr->ts.team; in gomp_work_share_end_nowait() local
194 if (team == NULL) in gomp_work_share_end_nowait()
208 if (completed == team->nthreads) in gomp_work_share_end_nowait()
212 gomp_mutex_lock (&team->work_share_lock); in gomp_work_share_end_nowait()
214 ws_index = thr->ts.work_share_generation & team->generation_mask; in gomp_work_share_end_nowait()
215 team->work_shares[ws_index] = NULL; in gomp_work_share_end_nowait()
216 team->oldest_live_gen++; in gomp_work_share_end_nowait()
217 team->num_live_gen--; in gomp_work_share_end_nowait()
219 gomp_mutex_unlock (&team->work_share_lock); in gomp_work_share_end_nowait()