From 778894bdf11aa1afe0d11b02c34ebdb05c6efdfd Mon Sep 17 00:00:00 2001 From: Rodrigo Kumpera Date: Thu, 2 Feb 2012 23:34:52 -0200 Subject: [PATCH] Fix linux build. --- .../corlib/Mono.Globalization.Unicode/SimpleCollator.cs | 1 + mcs/class/corlib/System.Collections/SortedList.cs | 5 +++-- mono/metadata/sgen-gc.c | 6 ++---- mono/metadata/sgen-gc.h | 2 +- mono/metadata/sgen-ssb.c | 13 +++++++++++++ 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/mcs/class/corlib/Mono.Globalization.Unicode/SimpleCollator.cs b/mcs/class/corlib/Mono.Globalization.Unicode/SimpleCollator.cs index 65228b4da62..d7e70785590 100644 --- a/mcs/class/corlib/Mono.Globalization.Unicode/SimpleCollator.cs +++ b/mcs/class/corlib/Mono.Globalization.Unicode/SimpleCollator.cs @@ -192,6 +192,7 @@ namespace Mono.Globalization.Unicode Uni.BuildTailoringTables (culture, t, ref contractions, ref level2Maps); unsafeFlags = new byte [UnsafeFlagLength]; + Console.WriteLine ("contractions == {0}", contractions == null); foreach (Contraction c in contractions) { if (c.Source.Length > 1) foreach (char ch in c.Source) diff --git a/mcs/class/corlib/System.Collections/SortedList.cs b/mcs/class/corlib/System.Collections/SortedList.cs index d39f7de0443..aa1c41a7846 100644 --- a/mcs/class/corlib/System.Collections/SortedList.cs +++ b/mcs/class/corlib/System.Collections/SortedList.cs @@ -355,8 +355,9 @@ namespace System.Collections { int indx = 0; try { indx = Find (key); - } catch (Exception) { - throw new InvalidOperationException(); + } catch (Exception e) { + Console.WriteLine ("WTF WTF {0}", e); + throw new InvalidOperationException("WTF WTF"); } return (indx | (indx >> 31)); diff --git a/mono/metadata/sgen-gc.c b/mono/metadata/sgen-gc.c index a3a1bf1e12b..032c71c96fb 100644 --- a/mono/metadata/sgen-gc.c +++ b/mono/metadata/sgen-gc.c @@ -3684,10 +3684,8 @@ update_current_thread_stack (void *start) void mono_sgen_fill_thread_info_for_suspend (SgenThreadInfo *info) { -#ifdef HAVE_KW_THREAD - /* update the remset info in the thread data structure */ - info->remset = remembered_set; -#endif + if (remset.fill_thread_info_for_suspend) + remset.fill_thread_info_for_suspend (info); } static gboolean diff --git a/mono/metadata/sgen-gc.h b/mono/metadata/sgen-gc.h index 56c98ced7ac..9d1490e39f4 100644 --- a/mono/metadata/sgen-gc.h +++ b/mono/metadata/sgen-gc.h @@ -532,6 +532,7 @@ typedef struct { void (*register_thread) (SgenThreadInfo *p); /* OPTIONAL */ void (*cleanup_thread) (SgenThreadInfo *p); /* OPTIONAL */ + void (*fill_thread_info_for_suspend) (SgenThreadInfo *info); /* OPTIONAL */ void (*prepare_for_minor_collection) (void); /* OPTIONAL */ void (*prepare_for_major_collection) (void); @@ -756,7 +757,6 @@ void mono_sgen_hash_table_clean (SgenHashTable *table) MONO_INTERNAL; extern MonoNativeTlsKey thread_info_key; #ifdef HAVE_KW_THREAD -extern __thread RememberedSet *remembered_set MONO_TLS_FAST; extern __thread SgenThreadInfo *thread_info; extern __thread gpointer *store_remset_buffer; extern __thread long store_remset_buffer_index; diff --git a/mono/metadata/sgen-ssb.c b/mono/metadata/sgen-ssb.c index 1d39da51e30..65f0c6da553 100644 --- a/mono/metadata/sgen-ssb.c +++ b/mono/metadata/sgen-ssb.c @@ -626,6 +626,15 @@ mono_sgen_ssb_register_thread (SgenThreadInfo *info) STORE_REMSET_BUFFER_INDEX = 0; } +#ifdef HAVE_KW_THREAD +static void +mono_sgen_ssb_fill_thread_info_for_suspend (SgenThreadInfo *info) +{ + /* update the remset info in the thread data structure */ + info->remset = remembered_set; +} +#endif + static void mono_sgen_ssb_prepare_for_minor_collection (void) { @@ -920,6 +929,10 @@ mono_sgen_ssb_init (SgenRemeberedSet *remset) remset->register_thread = mono_sgen_ssb_register_thread; remset->cleanup_thread = mono_sgen_ssb_cleanup_thread; +#ifdef HAVE_KW_THREAD + remset->fill_thread_info_for_suspend = mono_sgen_ssb_fill_thread_info_for_suspend; +#endif + remset->prepare_for_minor_collection = mono_sgen_ssb_prepare_for_minor_collection; remset->prepare_for_major_collection = mono_sgen_ssb_prepare_for_major_collection; -- 2.11.4.GIT