Lines Matching refs:team

28 /* This file handles the maintainence of threads in response to team
67 loop in which a thread waits to be called up to become part of a team. */
91 thr->ts.team->ordered_release[thr->ts.team_id] = &thr->release;
95 gomp_barrier_wait (&thr->ts.team->barrier);
97 gomp_barrier_wait (&thr->ts.team->barrier);
106 struct gomp_team *team;
110 /* Clear out the team and function data. This is a debugging
112 team = thr->ts.team;
115 thr->ts.team = NULL;
121 gomp_barrier_wait (&team->barrier);
134 /* Create a new team data structure. */
139 struct gomp_team *team;
142 size = sizeof (*team) + nthreads * sizeof (team->ordered_release[0]);
143 team = gomp_malloc (size);
144 gomp_mutex_init (&team->work_share_lock);
146 team->work_shares = gomp_malloc (4 * sizeof (struct gomp_work_share *));
147 team->generation_mask = 3;
148 team->oldest_live_gen = work_share == NULL;
149 team->num_live_gen = work_share != NULL;
150 team->work_shares[0] = work_share;
152 team->nthreads = nthreads;
153 gomp_barrier_init (&team->barrier, nthreads);
155 gomp_sem_init (&team->master_release, 0);
156 team->ordered_release[0] = &team->master_release;
158 return team;
162 /* Free a team data structure. */
165 free_team (struct gomp_team *team)
167 free (team->work_shares);
168 gomp_mutex_destroy (&team->work_share_lock);
169 gomp_barrier_destroy (&team->barrier);
170 gomp_sem_destroy (&team->master_release);
171 free (team);
175 /* Launch a team. */
183 struct gomp_team *team;
189 nested = thr->ts.team != NULL;
191 team = new_team (nthreads, work_share);
193 /* Always save the previous state, even if this isn't a nested team.
196 team->prev_ts = thr->ts;
198 thr->ts.team = team;
230 threads arrive before the team is released. */
236 team will exit. */
243 nthr->ts.team = team;
250 team->ordered_release[i] = &nthr->release;
289 start_data->ts.team = team;
310 gomp_barrier_wait (nested ? &team->barrier : &gomp_threads_dock);
313 that should arrive back at the end of this team. The extra
321 /* Terminate the current team. This is only to be called by the master
328 struct gomp_team *team = thr->ts.team;
330 gomp_barrier_wait (&team->barrier);
332 thr->ts = team->prev_ts;
334 free_team (team);