[cpp-threads] Thread support in C

Boehm, Hans hans.boehm at hp.com
Wed Aug 24 21:24:54 BST 2005


John -

I found your name on the WG14 web page.

A number of us have had extensive discussions about thread support in
C++, based on the observation that the current combination of the C/C++
language standards and, for example, the Posix threads standard, leave a
number of important issues seriously underspecified.  In particular,
current standards appear to allow compiler transformations that will
"break" multithreaded code, even when that code is correct by the
multithreaded programming rules you find in textbooks, etc.  You can see
a lot of the details at

http://www.hpl.hp.com/personal/Hans_Boehm/c++mm/

So far, largely for reasons of history and connections, we have worked
in the context of C++.

However, as part of this task, we are trying to define a library that
provides atomic operations on objects that may be accessed concurrently
by multiple threads.  The issue has come up whether we should consider C
compatibility, i.e. whether your committee might be interested in
keeping this piece compatible, or at least partially compatible, between
the two languages.  This would require that the C committee eventually
accept a similar library into the C standard.

Most of the other issues we have been discussing are relatively
independent of any differences between the two languages, or clearly
only apply to C++.  However, this may not be true for this library.

Any preliminary thoughts on this topic would be appreciated.  I am
certainly not expecting a commitment.  But an indication as to whether
it would be controversial, clearly not of interest, or probably of
interest, would be helpful.

If someone there has been following some of the technical issues, and
would like to actively participate in our discussions, please also let
us know that.

Thanks.

[A response to the mailing list may bounce, but I will forward.]

Hans






More information about the cpp-threads mailing list