Author: zoltan
Date: 2007-12-25 18:40:08 -0500 (Tue, 25 Dec 2007)
New Revision: 91886

Modified:
   trunk/mono/mono/mini/ChangeLog
   trunk/mono/mono/mini/mini.c
Log:
2007-12-26  Zoltan Varga  <[EMAIL PROTECTED]>

        * mini.c (mini_init): Move the setting of GC_stackbottom to 
mono_gc_base_init ().


Modified: trunk/mono/mono/mini/ChangeLog
===================================================================
--- trunk/mono/mono/mini/ChangeLog      2007-12-25 23:06:04 UTC (rev 91885)
+++ trunk/mono/mono/mini/ChangeLog      2007-12-25 23:40:08 UTC (rev 91886)
@@ -1,5 +1,7 @@
 2007-12-26  Zoltan Varga  <[EMAIL PROTECTED]>
 
+       * mini.c (mini_init): Move the setting of GC_stackbottom to 
mono_gc_base_init ().
+       
        * mini.c (mini_init): Call mono_gc_base_init () instead of 
MONO_GC_PRE_INIT ().
 
        * driver.c (mono_main): Ditto.

Modified: trunk/mono/mono/mini/mini.c
===================================================================
--- trunk/mono/mono/mini/mini.c 2007-12-25 23:06:04 UTC (rev 91885)
+++ trunk/mono/mono/mini/mini.c 2007-12-25 23:40:08 UTC (rev 91886)
@@ -12709,55 +12709,6 @@
        if (getenv ("MONO_DEBUG") != NULL)
                mini_parse_debug_options ();
 
-       /*
-        * Handle the case when we are called from a thread different from the 
main thread,
-        * confusing libgc.
-        * FIXME: Move this to libgc where it belongs.
-        *
-        * we used to do this only when running on valgrind,
-        * but it happens also in other setups.
-        */
-#if defined(HAVE_BOEHM_GC)
-#if defined(HAVE_PTHREAD_GETATTR_NP) && defined(HAVE_PTHREAD_ATTR_GETSTACK)
-       {
-               size_t size;
-               void *sstart;
-               pthread_attr_t attr;
-               pthread_getattr_np (pthread_self (), &attr);
-               pthread_attr_getstack (&attr, &sstart, &size);
-               pthread_attr_destroy (&attr); 
-               /*g_print ("stackbottom pth is: %p\n", (char*)sstart + size);*/
-#ifdef __ia64__
-               /*
-                * The calculation above doesn't seem to work on ia64, also we 
need to set
-                * GC_register_stackbottom as well, but don't know how.
-                */
-#else
-               /* apparently with some linuxthreads implementations sstart can 
be NULL,
-                * fallback to the more imprecise method (bug# 78096).
-                */
-               if (sstart) {
-                       GC_stackbottom = (char*)sstart + size;
-               } else {
-                       gsize stack_bottom = (gsize)&domain;
-                       stack_bottom += 4095;
-                       stack_bottom &= ~4095;
-                       GC_stackbottom = (char*)stack_bottom;
-               }
-#endif
-       }
-#elif defined(HAVE_PTHREAD_GET_STACKSIZE_NP) && 
defined(HAVE_PTHREAD_GET_STACKADDR_NP)
-               GC_stackbottom = (char*)pthread_get_stackaddr_np (pthread_self 
());
-#else
-       {
-               gsize stack_bottom = (gsize)&domain;
-               stack_bottom += 4095;
-               stack_bottom &= ~4095;
-               /*g_print ("stackbottom is: %p\n", (char*)stack_bottom);*/
-               GC_stackbottom = (char*)stack_bottom;
-       }
-#endif
-#endif
        mono_gc_base_init ();
 
        mono_jit_tls_id = TlsAlloc ();

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to