On Wed, Jul 22, 2015 at 02:56:15PM +0200, Sebastian Huber wrote: > 2015-07-22 Sebastian Huber <sebastian.hu...@embedded-brains.de> > > * team.c (gomp_new_thread_pool): Delete and move content to ... > (gomp_get_thread_pool): ... new function. Allocate and > initialize thread pool on demand. > (get_last_team): Use gomp_get_thread_pool(). > (gomp_team_start): Delete thread pool initialization. > --- > libgomp/team.c | 56 +++++++++++++++++++++++++++----------------------------- > 1 file changed, 27 insertions(+), 29 deletions(-) > > diff --git a/libgomp/team.c b/libgomp/team.c > index 7671b05..5c56182 100644 > --- a/libgomp/team.c > +++ b/libgomp/team.c > @@ -134,22 +134,39 @@ gomp_thread_start (void *xdata) > return NULL; > } > > +/* Get the thread pool, allocate and initialize it on demand. */ > + > +static struct gomp_thread_pool *
Please make this static inline struct gomp_thread_pool * (unlike the gomp_new_thread_pool call which has been solely cold path, this one has a hot path and thus we want to either inline it fully or inline it partially at least). Ok with that change. Jakub