Open MPI logo

Hardware Locality Development Mailing List Archives

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

Subject: Re: [hwloc-devel] The de-C99 of hwloc
From: Samuel Thibault (samuel.thibault_at_[hidden])
Date: 2011-02-18 11:48:12


Jeff Squyres, le Fri 18 Feb 2011 16:55:47 +0100, a écrit :
> Let's do pthread_once() -- we don't have any of the infrastructure mojo for memory barriers.
>
> What will we need on Windows?

It can easily be implemented with named mutexes on windows.

> Are there other OS's without pthread_once()?

It depends how far you look it the past. pthread_once was added to posix
in issue 5 (1998).

> >> Is there no portable way to define a library _init function?
> >
> > Not even in C99.
>
> Where should this functionality be, if we can't put it in an _init function, and it doesn't belong in the topology init function?

It would be a library initialization function that the programmer needs
to call. The topology init function is the best that can be done without
going that way.

Samuel