porting libjava to FreeBSD

John Polstra jdp@polstra.com
Sat Sep 25 10:41:00 GMT 1999


Mikhail Teterin wrote:
>> However, the low level code in libgcj-2.95.1/boehm-gc/linux_threads.c
> uses the non-existent (on FreeBSD) signal SIGPWR. With the following
> comment:
>> /*
> * The only way to suspend threads given the pthread
> * interface is to send signals. We can't use SIGSTOP
> * directly, because we need to get the thread to save
> * its stack pointer in the GC thread table before
> * suspending. So we have to reserve a signal of our own
> * for this. This means we have to intercept client
> * calls to change the signal mask. The linuxthreads
> * package already uses SIGUSR1 and SIGUSR2, so we need
> * to reuse something else. I chose SIGPWR. (Perhaps
> * SIGUNUSED would be a better choice.)
> */
> #define SIG_SUSPEND SIGPWR

Ick.
I think it would be better to suspend threads using
pthread_suspend_np().
John


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /