[Mono-devel-list] Mono-1.1.7 - NetBSD 2.0.x Support

Bill Middleton flashdict at gmail.com
Wed May 11 19:00:04 EDT 2005


On 5/11/05, Jérôme Laban <jaylee at epitech.net> wrote:
> 
>  
> I also noted that redefining register indices is not needed if 
> HAVE_WORKING_SIGALTSTACK is defined. But since it can be disabled using 
> --with-sigaltstack=no, it would break the compatibility with NetBSD's 
> sigcontext. I think its best to leave it there.
> 


Hmm. Well, it's probably beyond my charter to criticize here, but I don't 
think it'll make it in to the source like that. You've made sigaltstack=yes 
the default for netbsd2 in configure.in, so if some poor sap wants to try to 
run without it, he deserves to get his registers zapped a little, imho. :)

Btw, did you not have trouble with io-layer/collection.c? Awhile back I 
tried to help a netbsd user and we found that, at least on his version 
(early?) of 2.0, there was no definition for PTHREAD_STACK_MIN. Perhaps 
that's been fixed in netbsd now? Here's the patch that got him past that 
error. It simply presets a reasonable default for minimum stack size (which 
is broken in Freebsd except for CURRENT), so I knew right where to look. 

Index: /home/wjm/src/mono/mono/io-layer/collection.c
===================================================================
--- collection.c (revision 44342)
+++ collection.c (working copy)
@@ -53,7 +53,7 @@
g_assert (ret == 0);

#ifdef HAVE_PTHREAD_ATTR_SETSTACKSIZE
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__NetBSD__)
ret = pthread_attr_setstacksize (&attr, 65536);
#else
ret = pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN);


Finally, as I understood it, NetBSD 1.6 _does_ have working kernel threads, 
but not tls support for __thread, yes? I haven't tried it, but I was pretty 
sure that netbsd 1.6 would work ok with tls=pthread and sigaltstack 
(although ucontext was still very tentative then, and may not have __gregs, 
even). Unfortunately, I cant verify this, but thanks for leaving 1.6 a 
chance to join in the fray. I'll look your updated patch over soon and may 
even have some more witty comments. :)

Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050512/32f0dc97/attachment.html 


More information about the Mono-devel-list mailing list