14 struct gomp_team_state
16 struct gomp_team
*team
;
29 struct gomp_task
*parent
;
31 struct gomp_taskgroup
*taskgroup
;
33 struct gomp_taskwait taskwait
;
34 enum gomp_task_kind kind
;
39 _Bool in_taskgroup_wait
;
45 int task_running_count
;
49 struct gomp_team_state ts
;
50 struct gomp_task task
;
53 int b
, c
, d
, e
, f
, g
, h
, i
, k
, m
, o
, p
, r
;
55 void priority_queue_next_task (struct gomp_task
*, int, int);
56 int gomp_task_run_pre (struct gomp_task
*, struct gomp_task
, struct gomp_team
);
57 void priority_queue_insert (int, struct gomp_task
);
58 void priority_queue_insert2 (int, struct gomp_task
, int, int, int);
59 void priority_queue_insert3 (int, struct gomp_task
, int, int, int);
60 void gomp_sem_post (int);
67 struct gomp_thread
*t
= &a
;
68 struct gomp_team u
= *t
->ts
.team
;
69 struct gomp_task
*v
= &t
->task
, *w
;
70 if (__atomic_load_n (&l
.num_children
, MEMMODEL_ACQUIRE
))
74 priority_queue_next_task (v
, u
.task_queue
, r
);
77 if (n
->kind
== GOMP_TASK_WAITING
)
79 s
= gomp_task_run_pre (n
, q
, u
);
80 if (__builtin_expect (s
, 0))
84 goto finish_cancelled
;
87 l
.in_taskgroup_wait
= 1;
92 if (__builtin_expect (p
, 0))
98 struct gomp_task x
= x
;
101 struct gomp_task y
= j
;
104 priority_queue_insert (PQ_CHILDREN
, x
);
105 if (x
.taskwait
.in_taskwait
)
106 priority_queue_insert2 (PQ_TASKGROUP
, y
, e
, 0, d
);
109 priority_queue_insert3 (k
, y
, PRIORITY_INSERT_END
, 0, d
);
114 w
= (struct gomp_task
*) (n
- u
.task_running_count
- v
);
116 v
->taskgroup
= (struct gomp_taskgroup
*) m
;