MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
p = (GC_PTR) c->aux_info;
MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
+
+ // The class chain must be marked for runtime-allocated Classes
+ // loaded by the bootstrap ClassLoader.
+ p = (GC_PTR) c->next_or_version;
+ MAYBE_MARK (p, mark_stack_ptr, mark_stack_limit, c);
}
else
{
// Ignore pointers that do not point to the start of an object.
GC_all_interior_pointers = 0;
-#ifdef HAVE_DLFCN_H
+#if defined (HAVE_DLFCN_H) && defined (HAVE_DLADDR)
// Tell the collector to ask us before scanning DSOs.
GC_register_has_static_roots_callback (_Jv_GC_has_static_roots);
#endif
\f
-#ifdef HAVE_DLFCN_H
+#if defined (HAVE_DLFCN_H) && defined (HAVE_DLADDR)
// We keep a store of the filenames of DSOs that need to be
// conservatively scanned by the garbage collector. During collection
void
_Jv_RegisterLibForGc (const void *p __attribute__ ((__unused__)))
{
-#ifdef HAVE_DLFCN_H
+#if defined (HAVE_DLFCN_H) && defined (HAVE_DLADDR)
Dl_info info;
if (dladdr (const_cast<void *>(p), &info) != 0)
#endif
}
+void
+_Jv_SuspendThread (_Jv_Thread_t *thread)
+{
+#if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
+ && !defined(GC_WIN32_THREADS) && !defined(GC_DARWIN_THREADS)
+ GC_suspend_thread (_Jv_GetPlatformThreadID (thread));
+#endif
+}
+
+void
+_Jv_ResumeThread (_Jv_Thread_t *thread)
+{
+#if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
+ && !defined(GC_WIN32_THREADS) && !defined(GC_DARWIN_THREADS)
+ GC_resume_thread (_Jv_GetPlatformThreadID (thread));
+#endif
+}