thin locks (was Re: libgcj/117:)
Jeff Sturm
jsturm@sigma6.com
Fri Dec 10 12:54:00 GMT 1999
Godmar Back wrote:
[snip]
> Clearly, getting a thread id by using pthread_self() or the like would
> eliminate any advantage you hope to see from thin locks.
This isn't clear to me... what evidence do you have that pthread_self()
is expensive? Libpthread uses platform-dependent techniques whenever
available, falling back on the stack pointer.
On Alpha/Linux for example, pthread_self() calls PALcode to get the
unique thread descriptor. SPARC uses a reserved register. I believe
Intel uses the LDT...
--
Jeff Sturm
jsturm@sigma6.com
More information about the Java
mailing list