Re: why doesn't Sun's JDK for Solaris use pthreads?

Arch Stanton <unknown@xxxxxxxx> wrote in

In the course of debugging a problem I just noticed that Sun's JVM for
Solaris, as of Java 6, does not use POSIX threads (aka pthreads) but
rather the older Solaris-specific thread implementation. E.g. here's
what ldd says:

% ldd /opt/jdk1.6.0_01/jre/bin/java => /usr/lib/ => /opt/jdk1.6.0_01/jre/lib/sparc/jli/ => /usr/lib/ => /usr/lib/

(If it was using pthreads this would report instead of

I have no bug to report here; my problem was unrelated. I'm just
curious as to why. Presumably the code base must have been adapted to
pthreads years ago, as it's the only thread implementation on many
systems. So why not get with the standard and build their own native
JDK using pthreads?

Arch Stanton

Just a wild guess, absolutely no idea here.

Maybe the Solaris's pthread-implementation is build on top of the Solaris-
specific thread library.

By using native library they get rid of an added layer, and more power to