Lines Matching refs:team
28 /* This file contains routines to manage the work-share queue for a team
75 struct gomp_team *team = thr->ts.team;
80 if (team == NULL)
89 gomp_mutex_lock (&team->work_share_lock);
95 the team, then simply reference the existing construct. */
96 if (ws_gen - team->oldest_live_gen < team->num_live_gen)
98 ws_index = ws_gen & team->generation_mask;
99 ws = team->work_shares[ws_index];
104 gomp_mutex_unlock (&team->work_share_lock);
110 if (team->num_live_gen++ == team->generation_mask)
112 team->work_shares = gomp_realloc (team->work_shares,
113 2 * team->num_live_gen
114 * sizeof (*team->work_shares));
120 if (team->oldest_live_gen > 0)
121 memcpy (team->work_shares + team->num_live_gen,
122 team->work_shares,
123 (team->oldest_live_gen & team->generation_mask)
124 * sizeof (*team->work_shares));
126 team->generation_mask = team->generation_mask * 2 + 1;
129 ws_index = ws_gen & team->generation_mask;
130 ws = gomp_new_work_share (ordered, team->nthreads);
133 team->work_shares[ws_index] = ws;
136 gomp_mutex_unlock (&team->work_share_lock);
149 struct gomp_team *team = thr->ts.team;
156 if (team == NULL)
162 last = gomp_barrier_wait_start (&team->barrier);
168 ws_index = thr->ts.work_share_generation & team->generation_mask;
169 team->work_shares[ws_index] = NULL;
170 team->oldest_live_gen++;
171 team->num_live_gen = 0;
176 gomp_barrier_wait_end (&team->barrier, last);
187 struct gomp_team *team = thr->ts.team;
194 if (team == NULL)
208 if (completed == team->nthreads)
212 gomp_mutex_lock (&team->work_share_lock);
214 ws_index = thr->ts.work_share_generation & team->generation_mask;
215 team->work_shares[ws_index] = NULL;
216 team->oldest_live_gen++;
217 team->num_live_gen--;
219 gomp_mutex_unlock (&team->work_share_lock);