aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2019-03-27 18:30:44 +0000
committerKevin Buettner <kevinb@gcc.gnu.org>2019-03-27 18:30:44 +0000
commitbbf1efe1b46737304cde7b35a95b30d21157e54d (patch)
treec1bb9dd2c6e1ae5f110dfead7c78d2806a360a2e
parentc2709ec42b1bc7644e95f65f417be54101080602 (diff)
downloadgcc-bbf1efe1b46737304cde7b35a95b30d21157e54d.zip
gcc-bbf1efe1b46737304cde7b35a95b30d21157e54d.tar.gz
gcc-bbf1efe1b46737304cde7b35a95b30d21157e54d.tar.bz2
team.c (gomp_team_start): Initialize pool->threads[0].
libgomp/ChangeLog: * team.c (gomp_team_start): Initialize pool->threads[0]. From-SVN: r269971
-rw-r--r--libgomp/ChangeLog4
-rw-r--r--libgomp/team.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index 41ee3ed..30bb2d4 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,7 @@
+2019-03-27 Kevin Buettner <kevinb@redhat.com>
+
+ * team.c (gomp_team_start): Initialize pool->threads[0].
+
2019-02-22 Thomas Schwinge <thomas@codesourcery.com>
* testsuite/libgomp.oacc-c++/c++.exp: Specify
diff --git a/libgomp/team.c b/libgomp/team.c
index 2b2e975..c422da3 100644
--- a/libgomp/team.c
+++ b/libgomp/team.c
@@ -482,6 +482,8 @@ gomp_team_start (void (*fn) (void *), void *data, unsigned nthreads,
= gomp_realloc (pool->threads,
pool->threads_size
* sizeof (struct gomp_thread *));
+ /* Add current (master) thread to threads[]. */
+ pool->threads[0] = thr;
}
/* Release existing idle threads. */