On 9/23/12 2:02 PM, Stefan Teleman wrote:
On Sun, Sep 23, 2012 at 10:35 AM, Liviu Nicoara <nikko...@hates.ms> wrote:


2. The issue only exists in MT builds, should there be a guard in configs?

Yes, good point. The reason they aren't there is because we don't
actually provide a non-MT stdcxx at all in Solaris. I'll fix this.

I remember you mentioned it.


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?

It works. ;-) And it actually acts as a space saver. Wink-wink.

Nudge-nudge.

To be honest it's quite bizarre that you cannot share that with us. Is it really a trade secret? How can that be the case if Oracle customers are also required to perform the same alignment, perhaps using the same techniques like you showed in the patch?


But I don't think the _C_mutex member is static. In rw/_mutex.h,
_RWSTD_MUTEX_T is #defined as:

#include <pthread.h>
// [ ... snip ... ]
#  define _RWSTD_MUTEX_T                pthread_mutex_t

(for the definition Solaris cares about, which is POSIX).

So, in

class _RWSTD_EXPORT __rw_mutex_base
{
public:

// [ ... snip ... ]

     _RWSTD_MUTEX_T _C_mutex;
};

it looks like it's not declared static.

I meant the static member of __rw_static_mutex.


5. Why is __rw_guard aligned explicitly? I see it only contains a pointer to
a mutex object.

So that the __rw_mutex_base pointer ends up 8-byte aligned. There's a
lot of juju going on here.

6. The docs mention that the pragma must use the mangled variables names but I 
don't see that in the patch.

Yes, a few things are a bit different. ;-) I wish I didn't have to be
as vague and secretive about these things as I have to be.

Well, that's a pity. Thanks anyway.

Liviu

Reply via email to