This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
libgomp: Purpose of gomp_thread_pool::last_team?
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 2 Jul 2015 21:57:20 +0200 (CEST)
- Subject: libgomp: Purpose of gomp_thread_pool::last_team?
- Authentication-results: sourceware.org; auth=none
Hello,
does anyone know what the purpose of gomp_thread_pool::last_team is? This field seems to be used to delay the team destruction in gomp_team_end() in case the team has more than one thread and the previous team state has no team associated (identifies this a master thread?):
if (__builtin_expect (thr->ts.team != NULL, 0)
|| __builtin_expect (team->nthreads == 1, 0))
free_team (team);
else
{
struct gomp_thread_pool *pool = thr->thread_pool;
if (pool->last_team)
free_team (pool->last_team);
pool->last_team = team;
}
Why can you not immediately free the team?
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschÃftliche Mitteilung im Sinne des EHUG.