Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Sep 1999 10:40:45 -0700 (PDT)
From:      John Polstra <jdp@polstra.com>
To:        Mikhail Teterin <mi@aldan.algebra.com>
Cc:        java-discuss@sourceware.cygnus.com, obrien@FreeBSD.org, java@FreeBSD.org, jb@cimlogic.com.au, eischen@vigrid.com
Subject:   RE: porting libjava to FreeBSD
Message-ID:  <XFMail.990925104045.jdp@polstra.com>
In-Reply-To: <199909251726.NAA44892@rtfm.newton>

next in thread | previous in thread | raw e-mail | index | archive | help
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


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.990925104045.jdp>