[c++-pthreads] C++ and posix threads

Kai Henningsen kaih at khms.westfalen.de
Mon Dec 22 21:13:00 UTC 2003


jm at bourguet.org (Jean-Marc Bourguet)  wrote on 22.12.03 in <3FE70542.5060104 at bourguet.org>:

> I feel confused.  I wonder what is the context of the discussion
> and especially the constraints or the liberties we assume from
> an implementation.  Shoult it
>     - need the collaboration of the pthread library or be implementable
>       as wrapper around an existing pthread library?

If it is strictly a wrapper, that means it can be made to work everywhere  
there is a correct and sufficiently complete pthreads implementation.

If it needs pthreads-level changes, I see grave problems getting it  
implemented on non-glibc platforms. (Which would pretty much mean  
portability becomes an uninteresting question.)

>     - allow modifications to the C interface visible from C or not?

If it needs C-C changes, it is pretty much certain that POSIX will reject  
it, I believe. See the Ada experience.

>     - allow modifications to the C interface visible from C++ or not?

That could probably be done with wrappers. And giving the at least partly  
conflicting ideas between C and C++ on this, this may be necessary.

MfG Kai



More information about the c++-pthreads mailing list