Correctly calculate GC_stackbottom on OpenBSD and set the threadstack size
to a high value just like other BSD -s.
This commit is contained in:
parent
0e32391a40
commit
dbd0eb5db0
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.39 2010/04/08 16:40:04 robert Exp $
|
||||
# $OpenBSD: Makefile,v 1.40 2010/04/16 11:59:45 robert Exp $
|
||||
|
||||
# sync with net/avahi,-mono
|
||||
ONLY_FOR_ARCHS= amd64 i386 powerpc # arm
|
||||
@ -6,7 +6,7 @@ ONLY_FOR_ARCHS= amd64 i386 powerpc # arm
|
||||
COMMENT= cross platform, open source .NET developement framework
|
||||
|
||||
DISTNAME= mono-2.6.3
|
||||
PKGNAME= ${DISTNAME}p17
|
||||
PKGNAME= ${DISTNAME}p18
|
||||
|
||||
CATEGORIES= lang devel
|
||||
|
||||
|
12
lang/mono/patches/patch-mono_io-layer_collection_c
Normal file
12
lang/mono/patches/patch-mono_io-layer_collection_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-mono_io-layer_collection_c,v 1.1 2010/04/16 11:59:45 robert Exp $
|
||||
--- mono/io-layer/collection.c.orig Fri Apr 16 11:26:15 2010
|
||||
+++ mono/io-layer/collection.c Fri Apr 16 11:26:24 2010
|
||||
@@ -60,7 +60,7 @@ void _wapi_collection_init (void)
|
||||
|
||||
#ifdef HAVE_PTHREAD_ATTR_SETSTACKSIZE
|
||||
if (set_stacksize == 0) {
|
||||
-#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
ret = pthread_attr_setstacksize (&attr, 65536);
|
||||
#else
|
||||
ret = pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN);
|
21
lang/mono/patches/patch-mono_metadata_boehm-gc_c
Normal file
21
lang/mono/patches/patch-mono_metadata_boehm-gc_c
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-mono_metadata_boehm-gc_c,v 1.1 2010/04/16 11:59:45 robert Exp $
|
||||
--- mono/metadata/boehm-gc.c.orig Fri Apr 16 11:24:54 2010
|
||||
+++ mono/metadata/boehm-gc.c Fri Apr 16 11:26:01 2010
|
||||
@@ -84,6 +84,17 @@ mono_gc_base_init (void)
|
||||
}
|
||||
#elif defined(HAVE_PTHREAD_GET_STACKSIZE_NP) && defined(HAVE_PTHREAD_GET_STACKADDR_NP)
|
||||
GC_stackbottom = (char*)pthread_get_stackaddr_np (pthread_self ());
|
||||
+#elif defined(__OpenBSD__)
|
||||
+# include <pthread_np.h>
|
||||
+ {
|
||||
+ stack_t ss;
|
||||
+ int rslt;
|
||||
+
|
||||
+ rslt = pthread_stackseg_np(pthread_self(), &ss);
|
||||
+ g_assert (rslt == 0);
|
||||
+
|
||||
+ GC_stackbottom = (char*)ss.ss_sp;
|
||||
+ }
|
||||
#else
|
||||
{
|
||||
int dummy;
|
Loading…
Reference in New Issue
Block a user