Looks good. 

The only thing that is missing is the guarantee() that was present in the OS X 
code before:

   guarantee(thread_id != 0, "just checking");

Could you add it back?

Thanks,
/Staffan

On 24 sep 2013, at 00:57, Dmitry Samersoff <dmitry.samers...@oracle.com> wrote:

> Please review changes:
> 
> http://cr.openjdk.java.net/~dsamersoff/JDK-8022616/webrev.02/
> 
> Story:
> 
> Tracing framework expect u4 as an id of thread
> 
> pthread_t chosen as a tread id for variety of BSD platforms couldn't be
> converted to u4 so it cause compilation failure on BSD x64
> 
> Solution:
> 
> Change thread_id to pid_t and get this id  directly from kernel, the
> same manner as Linux code does. Mac Os X still uses mach_port instead of
> thread id.
> 
> Tested on FreeBSD and OpenBSD and also code passed jprt.
> 
> -Dmitry
> 
> -- 
> Dmitry Samersoff
> Oracle Java development team, Saint Petersburg, Russia
> * I would love to change the world, but they won't give me the sources.

Reply via email to