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.

Reply via email to