]> git.ipfire.org Git - thirdparty/gcc.git/commit - libgomp/task.c
openmp: Notify team barrier of pending tasks in omp_fulfill_event
authorKwok Cheung Yeung <kcy@codesourcery.com>
Fri, 14 May 2021 16:59:11 +0000 (09:59 -0700)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Mon, 17 May 2021 20:15:08 +0000 (13:15 -0700)
commitba886d0c488ebea2eb2df95c2069a3e207704dac
treec9977390cd9f7894ebc1837bbce68272f951d934
parent5d93261bc03c9c6891ccd8c77ab22b2a09971905
openmp: Notify team barrier of pending tasks in omp_fulfill_event

The team barrier should be notified of any new tasks that become runnable
as the result of a completing task, otherwise the barrier threads might
not resume processing available tasks, resulting in a hang.

2021-05-17  Kwok Cheung Yeung  <kcy@codesourcery.com>

libgomp/
* task.c (omp_fulfill_event): Call gomp_team_barrier_set_task_pending
if new tasks generated.
* testsuite/libgomp.c-c++-common/task-detach-13.c: New.
libgomp/task.c
libgomp/testsuite/libgomp.c-c++-common/task-detach-13.c [new file with mode: 0644]