summaryrefslogtreecommitdiffstats
path: root/libgomp/team.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-16 15:35:26 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2008-07-16 15:35:26 +0000
commita746af82db7c8da8aee3f13c6c1668db857f913c (patch)
tree0c0cc5fdd1c2567c317c9bba3233e37ed0b1f8d2 /libgomp/team.c
parent10c896daa3e6c7d706627fbcaf84d9dced1d146f (diff)
downloadppe42-gcc-a746af82db7c8da8aee3f13c6c1668db857f913c.tar.gz
ppe42-gcc-a746af82db7c8da8aee3f13c6c1668db857f913c.zip
* team.c (gomp_team_end): Free team immediately if it has
just one thread. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137886 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/team.c')
-rw-r--r--libgomp/team.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgomp/team.c b/libgomp/team.c
index 18b02e72f90..224236c6604 100644
--- a/libgomp/team.c
+++ b/libgomp/team.c
@@ -498,7 +498,8 @@ gomp_team_end (void)
gomp_mutex_destroy (&team->work_share_list_free_lock);
#endif
- if (__builtin_expect (thr->ts.team != NULL, 0))
+ if (__builtin_expect (thr->ts.team != NULL, 0)
+ || __builtin_expect (team->nthreads == 1, 0))
free_team (team);
else
{
OpenPOWER on IntegriCloud