Alan.Bateman at Sun.COM
Sun Apr 6 07:40:49 UTC 2008
Martin Buchholz wrote:
> There is a mismatch between the spec and implementation of
> // Returns an opaque token representing the native thread
> underlying the
> // invoking Java thread. On systems that do not require
> signalling, this
> // method always returns zero.
> static native long current();
> Java_sun_nio_ch_NativeThread_current(JNIEnv *env, jclass cl)
> #ifdef __linux__
> return (long)pthread_self();
> return -1;
> Which is it, zero or -1?
> Please file a bug.
A good observation. It should be 0L but as we only need to signal
threads on Linux, it doesn't cause any problems. I've added your mail to
6596323 so that it cna be fixed as part of that bug. Also, I've assigned
myself as RE as it was supposed to have been fixed ages ago.
More information about the core-libs-dev