Lines Matching refs:ws

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