This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: GC and Linux/SPARC?
- To: Alexandre Oliva <oliva at lsd dot ic dot unicamp dot br>
- Subject: Re: GC and Linux/SPARC?
- From: Jeff Sturm <jsturm at sigma6 dot com>
- Date: Thu, 11 Nov 1999 13:50:02 -0500
- CC: Bryce McKinlay <bryce at albatross dot co dot nz>, java-discuss at sourceware dot cygnus dot com
- Organization: AppNet
- References: <382A4905.1A4D8E54@albatross.co.nz> <orbt91ceux.fsf@garnize.lsd.ic.unicamp.br>
Alexandre Oliva wrote:
>
> On Nov 11, 1999, Bryce McKinlay <bryce@albatross.co.nz> wrote:
>
> > Has anyone successfully built libgcj with boehm GC on Linux/SPARC?
>
> Yep, but only with --disable-threads. Unfortunately, I don't have the
> faintest idea about how to implement GC_test_and_set on sparc :-(
It shouldn't be too hard... I wrote GC_test_and_set for Alpha using
examples from the Alpha Architecture Handbook.
But then we have to do the same for MIPS, ARM and everything else that
can run Linux if we are to be portable to those architectures... yuck.
It seems like a duplication of effort. LinuxThreads already has code
for test-and-set on all those architectures. So does the Linux kernel.
I don't understand why the GC code couldn't fall back on
pthread_mutex_lock when no test_and_set is available. It is a little
slower but should be safe since pthread_mutex_lock doesn't allocate
memory.
--
Jeff Sturm
jsturm@sigma6.com