On 09/16/12 12:03, Stefan Teleman wrote:
On Sat, Sep 15, 2012 at 5:47 PM, Liviu Nicoara <nikko...@hates.ms> wrote:

I merely wanted to point out that restoring the default packing is not the
same as restoring the packing to the previous value in effect.

Given this, I thought about an alternative way of forcing this alignment,
e.g., via a union, aligned on an appropriate type. I see an advantage here
in that most of the changes would occur where we define the 'primitive'
mutex and condition wrappers, saving a few pre-processor conditionals and
pragmas along the way.

I understood what you were saying. I just don't understand under what
_sane_ circumstances a program would #include a system library header
file with a previously set packing to something other than default. Or
would expect a non-default packing to work during a function call to a
sytem library. That's an insane configuration on any operating system
that I know of, not just on SPARCV8.

I can't think of a valid scenario, either. I guess the point is moot.

A few more questions, if you will, as I am going through the changes:

1. I see similarities with 1040, should/would you close that one?
2. The issue only exists in MT builds, should there be a guard in configs?
3. The align reference docs talk only about aligning variables, not types. Is 
that different on SPARC?
4. I see rw/_mutex.h has alignment pragmas for both __rw_mutex_base class and 
its mutex member; same for __rw_static_mutex and its static member, etc. How 
does that work?
5. Why is __rw_guard aligned explicitly? I see it only contains a pointer to a 
mutex object.
6. The docs mention that the pragma must use the mangled variables names but I 
don't see that in the patch.



Reply via email to