Return-Path: X-Original-To: apmail-stdcxx-dev-archive@www.apache.org Delivered-To: apmail-stdcxx-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 913B199AE for ; Sun, 23 Sep 2012 14:38:40 +0000 (UTC) Received: (qmail 67391 invoked by uid 500); 23 Sep 2012 14:38:40 -0000 Delivered-To: apmail-stdcxx-dev-archive@stdcxx.apache.org Received: (qmail 67328 invoked by uid 500); 23 Sep 2012 14:38:39 -0000 Mailing-List: contact dev-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list dev@stdcxx.apache.org Received: (qmail 67317 invoked by uid 99); 23 Sep 2012 14:38:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Sep 2012 14:38:39 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [64.34.174.152] (HELO hates.ms) (64.34.174.152) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 23 Sep 2012 14:38:33 +0000 Received: from [192.168.72.105] (unknown [166.57.38.196]) by hates.ms (Postfix) with ESMTPSA id 19AFC45C1A8 for ; Sun, 23 Sep 2012 14:38:12 +0000 (UTC) Message-ID: <505F1E4F.1030300@hates.ms> Date: Sun, 23 Sep 2012 10:35:59 -0400 From: Liviu Nicoara User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: dev@stdcxx.apache.org Subject: Re: STDCXX-1066 [was: Re: STDCXX forks] References: <5054B4B1.8040502@hates.ms> <5054EBD1.2010802@hates.ms> <5054F77C.9030406@hates.ms> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 09/16/12 12:03, Stefan Teleman wrote: > On Sat, Sep 15, 2012 at 5:47 PM, Liviu Nicoara 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. Thanks! Liviu