Re: [c++-pthreads] C++ and posix threads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [c++-pthreads] C++ and posix threads
- To: Jean-Marc Bourguet <jm@xxxxxxxxxxxx>
- Subject: Re: [c++-pthreads] C++ and posix threads
- From: Mark Mitchell <mark@xxxxxxxxxxxxxxxx>
- Date: 22 Dec 2003 08:48:26 -0800
On Mon, 2003-12-22 at 06:52, Jean-Marc Bourguet wrote:
> 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?
> - allow modifications to the C interface visible from C or not?
> - allow modifications to the C interface visible from C++ or not?
These are excellent questions.
I believe that the right answers are that:
(a) it is OK to have to make modifications to the pthread and/or C
libraries on the system,
(b) the modifications must be backwards-compatible in C (i.e., no
functions should be removed from the pthreads library, although it would
be OK to add new ones), and
(c) it is OK to consider slightly broader modifications to the existing
C interfaces for C++ (such as modifying "read()" to throw an exception),
but it should still be possible to recompile C programs as C++ programs
and get reasonable behavior.
--
Mark Mitchell <mark@xxxxxxxxxxxxxxxx>
CodeSourcery, LLC