On Sun, Nov 8, 2009 at 1:40 PM, John David Anglin <dave@xxxxxxxxxxxxxxxxxx> wrote: >> The gcj port to hppa uses a locking implementation >> (libjava/sysdeps/pa/locks.h) which is not signal safe. > > Yes. Is this the gcj problem that you were seeing with nptl? No it is not, but I noticed this during my investigations. I might as well fix it while I'm poking about. >> The assembly can be interrupted by a signal which if it calls >> compare_and_swap again will deadlock. However, I can't tell if this >> will ever happen. >> >> The fix for this is to port the lock implementation to use the >> light-weight in-kernel compare-and-swap, which is thread-safe and >> signal-safe. However, this is only available for Linux. > > I would say the linux implementation should uses the gcc atomic builtins. > They are based on the kernel compare-and-swap. Oh, that's a perefect idea, I wasn't sure that libjava could make use of those atomic builtins. Doesn't this restrict the gcc version you can use to rebuild libjava? Is that OK? >> Does locks.h also need to work for HPUX? > > Yes. OK, how do I write conditional code for HPUX vs. Linux? Cheers, Carlos. -- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html