[cpp-threads] Editorial comments on the straw man

Boehm, Hans hans.boehm at hp.com
Fri Jan 20 00:06:51 GMT 2006


There is an ongoing concurrent effort to look at a C++ Posix binding.
See https://www.redhat.com/mailman/listinfo/posix-c++-sg .  But that
hasn't gone far, yet.

Hans

> -----Original Message-----
> From: cpp-threads-bounces at decadentplace.org.uk 
> [mailto:cpp-threads-bounces at decadentplace.org.uk] On Behalf 
> Of Ben Hutchings
> Sent: Thursday, January 19, 2006 3:58 PM
> To: C++ threads standardisation
> Subject: Re: [cpp-threads] Editorial comments on the straw man
> 
> 
> On Thu, 2006-01-19 at 20:12 +0000, Nick Maclaren wrote:
> > Alexander Terekhov <alexander.terekhov at gmail.com> wrote:
> > > On 1/19/06, Boehm, Hans <hans.boehm at hp.com> wrote:
> > > [...]
> > > > But I'm afraid there are many special cases that deserve 
> > > > attention. Posix/C I/O by default does implicit locking.  (I'm 
> > > > inclined to believe this was a mistake, but it's not one we can 
> > > > fix.)
> > > 
> > > Many impls provide __fsetlocking() or alike.
> > 
> > That doesn't help.  There is no problem with the system calls. I 
> > didn't realise until Hans posted the above that POSIX had 
> got things 
> > THAT wrong.  fputc etc. are VERY clearly stated by C to be 
> unsafe if 
> > used twice between sequence points, and I would have thought that 
> > anyone would have deduced that they are not going to be 
> thread-safe, 
> > either.  However, the above does explain why modern headers 
> no longer 
> > include them as macros.
> > 
> > I don't suppose that anyone has a reliable list of the 
> function calls 
> > in C++ that POSIX says are not thread-safe?
> 
> In the absence of any pthreads binding for C++, no.  It is 
> *probably* safe to assume that what's thread-safe in the C 
> libary is still thread-safe in C++.  There was some 
> discussion about a de facto standard binding a while back - 
> see <http://www.codesourcery.com/archives/c++-pthreads/> - 
> but it wasn't very productive.
> 
> Ben.
> 
> -- 
> Ben Hutchings
> Unix is many things to many people,
> but it's never been everything to anybody.
> 



More information about the cpp-threads mailing list