Suggestion about including pthread.h

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

On 3/8/2012 7:25 PM, Alan Bateman wrote:
> On 08/03/2012 08:09, Shi Jun Zhang wrote:
>> 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:
> Kumar will likely have an opinion on java_md.c/ContinueInNewThread0. 
> Personally I would go for #ifdef __solaris ... #end ... #endif rather 
> than #ifndef __solaris__.
I've modified it to #ifdef __solaris__ ... #else ... #endif.
> I don't think the changes to NativeThread.c are quite right because it 
> assumes that we need to signal threads on platforms other than Solaris 
> and it also assumes the signal is __SIGRTMAX - 2. I don't know what 
> you use in your AIX port but once the preemptive close issues are 
> sorted out on Mac then I assume it will be SIGIO. So for this one I 
> would suggest the ifdef in the init, current and signal methods be 
The situation in NativeThread.c is more complicated than other 2 files. 
I'm not familiar with BSD or Mac. It seems that we don't need to signal 
threads on BSD or Mac. And INTERRUPT_SIGNAL on AIX will definitely be 
different from the one on Linux. I think we'd better separate the 
changes in NativeThread.c from this patch and try to solve it later.
> The change to socket_md.c looks okay to me but you will need to 
> re-base your patch due to the Mac port in jdk8/tl.
I'm a new comer and i got known from Charles about the difference 
between jdk8 and jdk8/tl. The latest webrev is based on jdk8/tl.


Shi Jun Zhang

More information about the core-libs-dev mailing list