mirror of git://gcc.gnu.org/git/gcc.git
re PR libgomp/51376 (libgomp taskwait failure)
PR libgomp/51376 * task.c (GOMP_taskwait): Don't access task->children outside of task_lock mutex region. (GOMP_task): Likewise. From-SVN: r182151
This commit is contained in:
parent
108ba412c4
commit
fbf7be801c
|
@ -1,3 +1,10 @@
|
||||||
|
2011-12-09 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
PR libgomp/51376
|
||||||
|
* task.c (GOMP_taskwait): Don't access task->children outside of
|
||||||
|
task_lock mutex region.
|
||||||
|
(GOMP_task): Likewise.
|
||||||
|
|
||||||
2011-12-06 Jakub Jelinek <jakub@redhat.com>
|
2011-12-06 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR libgomp/51132
|
PR libgomp/51132
|
||||||
|
|
|
@ -116,10 +116,11 @@ GOMP_task (void (*fn) (void *), void *data, void (*cpyfn) (void *, void *),
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
fn (data);
|
fn (data);
|
||||||
if (task.children)
|
if (team != NULL)
|
||||||
{
|
{
|
||||||
gomp_mutex_lock (&team->task_lock);
|
gomp_mutex_lock (&team->task_lock);
|
||||||
gomp_clear_parent (task.children);
|
if (task.children != NULL)
|
||||||
|
gomp_clear_parent (task.children);
|
||||||
gomp_mutex_unlock (&team->task_lock);
|
gomp_mutex_unlock (&team->task_lock);
|
||||||
}
|
}
|
||||||
gomp_end_task ();
|
gomp_end_task ();
|
||||||
|
@ -290,8 +291,9 @@ GOMP_taskwait (void)
|
||||||
struct gomp_task *child_task = NULL;
|
struct gomp_task *child_task = NULL;
|
||||||
struct gomp_task *to_free = NULL;
|
struct gomp_task *to_free = NULL;
|
||||||
|
|
||||||
if (task == NULL || task->children == NULL)
|
if (task == NULL || team == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gomp_mutex_lock (&team->task_lock);
|
gomp_mutex_lock (&team->task_lock);
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue