This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
RE: porting libjava to FreeBSD
- To: Mikhail Teterin <mi at aldan dot algebra dot com>
- Subject: RE: porting libjava to FreeBSD
- From: John Polstra <jdp at polstra dot com>
- Date: Sat, 25 Sep 1999 10:40:45 -0700 (PDT)
- Cc: java-discuss at sourceware dot cygnus dot com, obrien at FreeBSD dot org, java at FreeBSD dot org, jb at cimlogic dot com dot au, eischen at vigrid dot com
- Organization: Polstra & Co., Inc.
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