team.c (gomp_team_end): Free team immediately if it has just one thread.

* team.c (gomp_team_end): Free team immediately if it has
	just one thread.

From-SVN: r137886
This commit is contained in:
Jakub Jelinek 2008-07-16 17:35:26 +02:00 committed by Jakub Jelinek
parent 9a8d7941eb
commit 4db72361fe
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-07-16 Jakub Jelinek <jakub@redhat.com>
* team.c (gomp_team_end): Free team immediately if it has
just one thread.
2008-07-08 David Edelsohn <edelsohn@gnu.org>
* testsuite/libgomp.c++/c++.exp: Append multilib library path.

View File

@ -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
{