Hi,

the applied patch adds support for newer versions of Boehm GC (required for a 
working GC under Solaris).

The new API introduces a function called GC_allow_register_threads() which 
explicitly turns on thread management within the garbage collector. The patch 
takes care for calling this function at the right time if necessary.

Burkhard Linke
Index: configure.in
===================================================================
--- configure.in	(revision 157935)
+++ configure.in	(working copy)
@@ -859,6 +859,13 @@
 		if test "x$found_gc_enable" = "xyes"; then
 			AC_DEFINE(HAVE_GC_ENABLE, 1, [Have 'GC_enable'])
 		fi
+
+		# check whether we need to explicitly allow
+		# thread registering
+		AC_CHECK_LIB(gc, GC_allow_register_threads, found_allow_register_threads="yes",,$libdl)
+		if test "x$found_allow_register_threads" = "xyes"; then
+			AC_DEFINE(HAVE_GC_ALLOW_REGISTER_THREADS, 1, [GC requires thread registration])
+		fi
 		;;
 
 	xincluded)
Index: mono/metadata/boehm-gc.c
===================================================================
--- mono/metadata/boehm-gc.c	(revision 157935)
+++ mono/metadata/boehm-gc.c	(working copy)
@@ -123,6 +123,10 @@
 #ifdef HAVE_GC_GCJ_MALLOC
 	GC_init_gcj_malloc (5, NULL);
 #endif
+#ifdef HAVE_GC_ALLOW_REGISTER_THREADS
+	GC_allow_register_threads();
+#endif
+
 	mono_gc_enable_events ();
 	gc_initialized = TRUE;
 }
_______________________________________________
Mono-devel-list mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to