This is the mail archive of the
mailing list for the Java project.
Re: Segment Register thread descriptor (was Re: Jv_AllocBytesChec ked)
- To: "Boehm, Hans" <hans_boehm at hp dot com>
- Subject: Re: Segment Register thread descriptor (was Re: Jv_AllocBytesChec ked)
- From: Ulrich Drepper <drepper at redhat dot com>
- Date: 09 Jan 2001 00:51:00 -0800
- Cc: tromey at redhat dot com, "'Bryce McKinlay'" <bryce at albatross dot co dot nz>, "'java-discuss at sources dot redhat dot com'" <java-discuss at sources dot redhat dot com>, "MOSBERGER, DAVID (HP-PaloAlto,unix3)" <davidm at hpl dot hp dot com>, Benjamin Kosnik <bkoz at redhat dot com>
- References: <140D21516EC2D3119EE700902787664401E3A80C@hplex1.hpl.hp.com>
- Reply-To: drepper at cygnus dot com (Ulrich Drepper)
"Boehm, Hans" <firstname.lastname@example.org> writes:
> As was pointed out by one of the other posters, there are some copyright
> issues. We would like to be able to reuse at least the assembly sequences
> that are currently in various other libraries. The license on the result
> should be sufficiently liberal that it does not discourage use.
And encourage even more exploitation of Free Software? If a
specification is available the people who want to use the
functionality in non-free programs can write their own code.
> > What would the thread register be used for? Is it a pointer, is it
> > some other numeric value. Or as in the x86 case, what is if it is not
> > really accessible? Similarly on Alpha where the thread pointer is
> > retrieved through a (very fast) PAL code call.
> So long as this is effectively part of the ABI (e.g. on Alpha?) I don't
> it matters. The call in the library would expand to the PAL code call or
> If the call depends on the thread library, then there are some hard choices
> (which I would mostly push back to the client, with a reasonable default).
This is not really the point but I can answer this anyway. On Alpha
there is room for one (thread) context-specific word. It can be used
in whatever way, we store a pointer. The PAL is lower than any OS,
it's more or less part of the CPU. So it's not really part of the ABI
but everybody does it.
What I actually meant is that there are two uses of the thread IDs:
the first in a context, and all later ones. On Alpha and some other
architectures it is stupid to use the same mechanism to retrieve the
thread ID more than once in a context. Instead the value should be
stored locally. On other architectures (IA-64, ...) this isn't
I don't have appropriate macros in the thread library to handle this
since I couldn't think of any. Instead I maintain the thread ID's
manually. This is not optimal and would have to be abstracted out.
> I think you're giving to much credit to us corporate software developers.
Definitely not! :-)
> In many cases, it's not easy for us to test on competitive hardware either,
Why should you? You only have to have access to the platforms you
care about. And this definitely is the case. Free Software packages
are different since they potentially have to run everywhere.
> though I do currently have the advantage that I can test on different HP
> hardware. But I think I understand the problem. I think in this case, the
> problem is fundamentally unsolvable;
At some level, yes. But making the implementation (in this case this
atomicity library) more complicated can help to hide many differences.
Since the people writing the library do much more about this issue
it's much safer to put the burden on them. Therefore a design goal
here should be to think about the most general solution even if this
means very complicated implementations (and compiler dependencies).
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------