[Mono-devel-list] Patches for FreeBSD (and other BSD flavors, likely)

Zoltan Varga vargaz at gmail.com
Mon Apr 4 09:57:02 EDT 2005


                                            Hi,

  I checked in a simpler fix for the sigcontext issues. Now all the
sigcontext/ucontext madness is handled in the
mono_arch_sigctx_to_monoctx
function and its counterpart. Could you try whenever it works on BSD ?

            thanks

                      Zoltan

On Apr 3, 2005 4:22 PM, Bill Middleton <flashdict at gmail.com> wrote:
> Zoltan Varga wrote:
> 
> >  For the sigcontext stuff, I think it would be easier to define
> >MONO_ARCH_USE_SIGACTION in mini-x86.h for *BSD as well. Could you try
> >this ?
> >
> >
> Both NetBSD and FreeBSD seem to be on their way towards ucontext{} and
> away from sigcontext.  NetBSD completely hides sigcontext{} in the
> latest 1.6.x source code, on the way to 2.0, except when __KERNEL is
> defined.  FreeBSD > 5.4_PRERELEASE, however, has taken a different
> approach to the migration, and is attempting to make a backwards
> compatible union out of sigcontext{} and  ucontext_t{}.  Neither case
> will support the ucontext code as currently written in exceptions-x86.c,
> since the .gregs[] array isn't part of BSD ucontext at all.  In every
> case, the older definitions for sigcontext must be supported to continue
> to build on any but the absolute latest and most cutting-edge BSD
> kernel/userlands with much futzing.
> 
> I do agree though, that BSD* should eventually have it's own exception
> code for signaling and exceptions based on ucontext_t{}, like s390 (for
> example).  It will be a chore though, given the mutations and
> intent/purpose between the BSD flavors.  Not to mention the likely loss
> of at least some the x86 optimizations which are possible with direct
> munging of sigcontext.
> 
> I hope my patch can go in as is, and the future changes to the exception
> code will support the older #define's for bsd -  it's just too early to
> try to make the switch to MONO_ARCH_USE_SIGACTION right now, imho.
> 
>  And we haven't even touched on the threads and the (almost there)
> support for __thread on FreeBSD, nor sigaltstack(), but then I don't
> want my head to explode today, either.
> 
> Bill
> 
>



More information about the Mono-devel-list mailing list