Skip to content

Commit

Permalink
Applied patch from Burkhard Linke <[email protected]>. …
Browse files Browse the repository at this point in the history
…Add support for newer boehm-gc versions.
  • Loading branch information
vargaz committed Jan 27, 2011
1 parent 1c28d8d commit 7a0ebcc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,14 @@ case "x$gc" in
if test "x$found_gc_enable" = "xyes"; then
BOEHM_DEFINES="-DHAVE_GC_ENABLE $BOEHM_DEFINES"
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)
Expand Down
4 changes: 4 additions & 0 deletions mono/metadata/boehm-gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ mono_gc_base_init (void)
GC_init_gcj_malloc (5, NULL);
#endif

#ifdef HAVE_GC_ALLOW_REGISTER_THREADS
GC_allow_register_threads();
#endif

if ((env = getenv ("MONO_GC_PARAMS"))) {
char **ptr, **opts = g_strsplit (env, ",", -1);
for (ptr = opts; *ptr; ++ptr) {
Expand Down

0 comments on commit 7a0ebcc

Please sign in to comment.