Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] backends and plugins
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2012-08-22 01:51:36


Le 21/08/2012 21:18, Samuel Thibault a écrit :
> Brice Goglin, le Tue 21 Aug 2012 18:49:48 +0200, a écrit :
>> 1) We load plugins and list existing components once per topology. We
>> should do it only once per process. But that requires some locking in
>> case multiple topologies are loaded simultaneously, which means we need
>> thread-safety. Do we want pthread_mutex() for this?
> I'd say so. We can test in configure.ac whether -lpthread is really
> needed for that (it is not on most systems, which optimizes things away
> in non-libpthread cases).

So pthread_mutex() is always available, at least with -lpthread, on all
platforms we support?
I am asking this because "shared" component registration (right after
shared loading of plugins) needs mutex too.
If there's no mutex, I can disable plugin support. But nothing would
works if I disable component registration too.

Brice