static void* boehm_thread_register (MonoThreadInfo* info, void *baseptr) { #if GC_VERSION_MAJOR >= 7 struct GC_stack_base sb; int res; res = GC_get_stack_base (&sb); if (res != GC_SUCCESS) { sb.mem_base = baseptr; #ifdef __ia64__ /* Can't determine the register stack bounds */ g_error ("mono_gc_register_thread failed ().\n"); #endif } res = GC_register_my_thread (&sb); if ((res != GC_SUCCESS) && (res != GC_DUPLICATE)) { g_warning ("GC_register_my_thread () failed.\n"); return NULL; } return info; #else if (mono_gc_is_gc_thread()) return info; #if defined(USE_INCLUDED_LIBGC) && !defined(HOST_WIN32) return GC_thread_register_foreign (baseptr) ? info : NULL; #else return NULL; #endif #endif }
gboolean mono_gc_register_thread (void *baseptr) { #if GC_VERSION_MAJOR >= 7 struct GC_stack_base sb; int res; res = GC_get_stack_base (&sb); if (res != GC_SUCCESS) { sb.mem_base = baseptr; #ifdef __ia64__ /* Can't determine the register stack bounds */ g_error ("mono_gc_register_thread failed ().\n"); #endif } res = GC_register_my_thread (&sb); if ((res != GC_SUCCESS) && (res != GC_DUPLICATE)) { g_warning ("GC_register_my_thread () failed.\n"); return FALSE; } return TRUE; #else if (mono_gc_is_gc_thread()) return TRUE; #if defined(USE_INCLUDED_LIBGC) && !defined(PLATFORM_WIN32) return GC_thread_register_foreign (baseptr); #else return FALSE; #endif #endif }
static void* boehm_thread_register (MonoThreadInfo* info, void *baseptr) { if (mono_gc_is_gc_thread()) return info; #if !defined(HOST_WIN32) return GC_thread_register_foreign (baseptr) ? info : NULL; #else return NULL; #endif }