Lines Matching refs:ws
41 struct gomp_work_share *ws;
44 size = sizeof (*ws);
46 size += nthreads * sizeof (ws->ordered_team_ids[0]);
48 ws = gomp_malloc_cleared (size);
49 gomp_mutex_init (&ws->lock);
50 ws->ordered_owner = -1;
52 return ws;
59 free_work_share (struct gomp_work_share *ws)
61 gomp_mutex_destroy (&ws->lock);
62 free (ws);
76 struct gomp_work_share *ws;
82 ws = gomp_new_work_share (ordered, 1);
83 thr->ts.work_share = ws;
85 gomp_mutex_lock (&ws->lock);
99 ws = team->work_shares[ws_index];
100 thr->ts.work_share = ws;
103 gomp_mutex_lock (&ws->lock);
130 ws = gomp_new_work_share (ordered, team->nthreads);
131 thr->ts.work_share = ws;
133 team->work_shares[ws_index] = ws;
135 gomp_mutex_lock (&ws->lock);
150 struct gomp_work_share *ws = thr->ts.work_share;
158 free_work_share (ws);
173 free_work_share (ws);
188 struct gomp_work_share *ws = thr->ts.work_share;
196 free_work_share (ws);
201 completed = __sync_add_and_fetch (&ws->threads_completed, 1);
203 gomp_mutex_lock (&ws->lock);
204 completed = ++ws->threads_completed;
205 gomp_mutex_unlock (&ws->lock);
221 free_work_share (ws);