On Tue, Jul 14, 2015 at 11:28:18AM +0200, Sebastian Huber wrote: > If I destroy the barrier of the last team, and then initialize it later in > gomp_new_team() > > +static inline struct gomp_team * > +get_last_team (unsigned nthreads) > +{ > + struct gomp_thread *thr = gomp_thread (); > + if (thr->ts.team == NULL) > + { > + struct gomp_thread_pool *pool = thr->thread_pool; > + if (pool != NULL) > + { > + struct gomp_team *last_team = pool->last_team; > + if (last_team != NULL && last_team->nthreads == nthreads) > + { > + pool->last_team = NULL; > + gomp_barrier_destroy (&last_team->barrier); > + return last_team; > + } > + } > + } > + return NULL; > +} > > then I get test suite failures. Is it safe to destroy the team barrier here > or do we circumvent the last team mechanism which is supposed to delay the > destruction?
Then you indeed supposedly hit the reason why last_team exists. Thus, if not reinitializing the team barrier works even with --disable-linux-futex configured libgomp, I guess it is ok not to destroy it and reinit it again. Jakub