[cpp-threads] pthreads (was: RE: C++ Connections proposal)

Boehm, Hans hans.boehm at hp.com
Wed Apr 27 23:40:36 BST 2005


I'd actually like to get more comments on this.  The more I think
about this, the less I'm convinced that we should change the proposal.

If I understand correctly, the current proposal, with this ABI,
does require compiler changes, but it does not require an ABI
change.  And the compiler changes generally involve generating
something like the following for bit-field updates:

1. Possibly read old value of misaligned field, as before.
2. Compute halves/thirds/whatever of new field value.
3. Store pieces back into only the field being updated.

This probably takes slightly more instructions than the old
version.  But I wouldn't be surprised if it shortens the critical
path in some cases, since you often no longer need the initial
load.

Thus my guess would be that this is a small penalty that affects
a very small portion of the code, where the alternative is to
significantly complicate the programming model, and leave some
very subtly broken client code broken.

Unless I'm missing something, I would advocate sticking with the
current proposal (which I just updated to reflect this issue).

Hans

> -----Original Message-----
> From: 
> Cpp-threads_decadentplace.org.uk-bounces at decadentplace.org.uk 
> [mailto:Cpp-threads_decadentplace.org.uk-bounces at decadentplace
> .org.uk] On Behalf Of Alexander Terekhov
> Sent: Wednesday, April 27, 2005 5:23 AM
> To: cpp-threads at decadentplace.org.uk
> Subject: Re: [cpp-threads] pthreads (was: RE: C++ Connections 
> proposal)
> 
> 
> On 4/27/05, Nelson, Clark <clark.nelson at intel.com> wrote:
> [...]
> > I'm sorry, but I'm afraid the adjacent bit-field rule isn't good 
> > enough. Consider a case like the following:
> > 
> > struct X { char a; int b: 16; char c; };
> 
> Yup. I need to go now, so pardon for yet another link (you might want 
> to read the entire "Memory isolation" thread):
> 
> http://www.google.de/groups?selm=4135A3B5.EBC59C77%40web.de
> 
> > Clark Nelson            Vice chair, J16 (ANSI C++ standard 
> committee)
> 
> Many moons back BTW, I was told that
> 
> "....
>  For your information, this subject was discussed at the last 
>  meeting of the British C++ standards panel, and the consensus 
>  seemed to be that it was an issue worth pursuing further. This 
>  doesn't mean it will be dealt with by the next C++ standard, 
>  but it is one step closer."  
> 
> "this subject" == "Memory isolation"
> 
> http://tinyurl.com/55dw
> 
> regards,
> alexander.
> 
> -- 
> cpp-threads mailing list
> cpp-threads at decadentplace.org.uk 
> http://decadentplace.org.uk/mailman/listinfo/cpp-threads_decad
entplace.org.uk




More information about the cpp-threads mailing list