Hello,

I work currently on the libgomp support for the RTEMS operating system.  It 
uses the POSIX configuration and it works all right so far.  One problem is 
that each GOMP_parallel() invocation calls gomp_new_team() which uses malloc() 
and initializes a couple of mutex, barrier and semaphore objects. On Linux the 
initialization and destruction of these objects is negligible, but on RTEMS 
these are quite heavy weight operations.  The malloc() call however might be 
also noticeable on Linux.  Does it make sense to introduce a free list of 
teams?  Something like this:

struct gomp_team *
gomp_new_team(unsigned nthreads)
{
  struct gomp_team *team = get_team_from_free_list(nthreads);

  if (team == NULL) {
    return current_gomp_new_team(nthreads);
  } else {
    return 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