Suggestion about including pthread.h

Shi Jun Zhang zhangshj at
Fri Mar 9 08:19:08 UTC 2012

On 3/8/2012 7:59 PM, David Holmes wrote:
> On 8/03/2012 6:09 PM, Shi Jun Zhang wrote:
>> On 3/2/2012 5:05 PM, Alan Bateman wrote:
>>> On 02/03/2012 07:53, David Holmes wrote:
>>>> Yes we need to move to a more capability based inclusion &
>>>> conditional compilation mechanism. I'm not sure if the build-infra
>>>> project is tackling this particular case.
>>> Yes, I think moving to a more capability based compilation is where
>>> build-infa wants to go, although clearly it's going to take a long
>>> time. As I see, that project will put the infrastructure in place and
>>> then it's up to each area to gradually eliminate the ifdef platform
>>> usages. I don't think they will all go away but with effort then
>>> things should be more portable than what we have now.
>>> -Alan.
>> There is still no reply from build infra project and even if it is in
>> build infra, it will take a long time to merge back to trunk. But this
>> including pthread problem really affects AIX platform. I'm thinking we
>> can use #ifndef __solaris__ form because all other POSIX-conformant
>> platforms (BSD, Mac, AIX, ...) except Solaris need to include pthread.h.
>> Here is the webrev:
> If Linux==BSD==AIX then changing things to be !solaris might be right, 
> but it is not clear that is the case. In NativeThread.c changing 
> "ifdef linux" to "ifndef solaris" seems simply wrong - as it changes 
> the sense of all those blocks for BSD! But then I don't see any BSD 
> code in there?
> David
Hi David,

You are right. The changes in NativeThread.c is wrong. BSD doesn't need 
pthread blocks and AIX needs different definition of INTERRUP_SIGNAL, so 
I exclude the NativeThread.c changes from this patch. We can solve it 
later. And I've done some modification according to Alan's comments. The 
new webrev link is


Shi Jun Zhang

More information about the core-libs-dev mailing list