On 13/07/15 16:17, Jakub Jelinek wrote:
On Mon, Jul 13, 2015 at 01:15:44PM +0200, Sebastian Huber wrote:
diff --git a/libgomp/team.c b/libgomp/team.c
index b98b233..0bcbaf8 100644
--- a/libgomp/team.c
+++ b/libgomp/team.c
@@ -134,6 +134,25 @@ gomp_thread_start (void *xdata)
    return NULL;
  }
+static struct gomp_team *
+get_recycable_team (unsigned nthreads)
That would be recyclable.
But I think get_last_team would be better.

Ok.

Also, please make it static inline.

Out of curiosity, does this make a difference for a static function in a module if it has the inline or not?


+      team = gomp_malloc (sizeof (*team) + nthreads * extra);
+
+#ifndef HAVE_SYNC_BUILTINS
+      gomp_mutex_init (&team->work_share_list_free_lock);
+#endif
Avoiding gomp_mutex_destroy/gomp_mutex_init is fine,
but I must say I'm far less sure about gomp_sem_init (can you
add there a temporary assert that it has the expected value)
and even less about gomp_barrier_init (I think e.g. on Linux
generation will be very unlikely 0 that it should be, and not
sure about awaited_final value either).

        Jakub

I didn't observe any testsuite failures on x86_64-unknown-linux-gnu with this patch. I will add asserts and re-run the testsuite tomorrow.

--
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.hu...@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

Reply via email to