static GC_bool keys_initialized;
+#ifdef MONO_DEBUGGER_SUPPORTED
+#include "include/libgc-mono-debugger.h"
+#endif
+
/* Recover the contents of the freelist array fl into the global one gfl.*/
/* Note that the indexing scheme differs, in that gfl has finer size */
/* resolution, even if not all entries are used. */
} else {
prev -> next = p -> next;
}
+#ifdef MONO_DEBUGGER_SUPPORTED
+ if (gc_thread_vtable && gc_thread_vtable->thread_exited)
+ gc_thread_vtable->thread_exited (id, &p->stop_info.stack_ptr);
+#endif
GC_INTERNAL_FREE(p);
}
GC_destroy_thread_local(p);
}
# endif /* THREAD_LOCAL_ALLOC */
- if (p != &first_thread) GC_INTERNAL_FREE(p);
+ if (p != &first_thread) GC_INTERNAL_FREE(p);
}
}
GC_threads[hv] = me;
}
+ GC_INTERNAL_FREE(p);
}
#endif /* HANDLE_FORK */
t -> stop_info.stack_ptr = (ptr_t)(&dummy);
# endif
t -> flags = DETACHED | MAIN_THREAD;
+#ifdef MONO_DEBUGGER_SUPPORTED
+ if (gc_thread_vtable && gc_thread_vtable->thread_created)
+ gc_thread_vtable->thread_created (pthread_self (), &t->stop_info.stack_ptr);
+#endif
GC_stop_init();
/* This is also < 100% convincing. We should also read this */
/* from /proc, but the hook to do so isn't there yet. */
# endif /* IA64 */
+#ifdef MONO_DEBUGGER_SUPPORTED
+ if (gc_thread_vtable && gc_thread_vtable->thread_created)
+ gc_thread_vtable->thread_created (my_pthread, &me->stop_info.stack_ptr);
+#endif
UNLOCK();
if (start) *start = si -> start_routine;