Makes --disable-gc work again
authorDavid Flamme <dflamme@complang.tuwien.ac.at>
Fri, 4 Nov 2011 14:27:46 +0000 (15:27 +0100)
committerDavid Flamme <dflamme@complang.tuwien.ac.at>
Fri, 4 Nov 2011 14:27:46 +0000 (15:27 +0100)
* src/threads/thread.cpp : attach_custom_finalizer(..) depends on an enabled boehm gc

src/threads/thread.cpp

index dad552bd16b7c307f4993e709b4f6e403dfc44be..5775d0810caeeb768fe7a1c951a215add073d89a 100644 (file)
@@ -417,7 +417,9 @@ bool threads_thread_start_internal(utf *name, functionptr f)
                return false;
        }
 
+#if defined(ENABLE_GC_BOEHM)
        Finalizer::attach_custom_finalizer(LLNI_WRAP(t->object), thread_cleanup_finalizer, t);
+#endif
 
        /* Start the thread. */
 
@@ -467,7 +469,9 @@ void threads_thread_start(java_handle_t *object)
 
        ThreadRuntime::setup_thread_vmdata(jlt, t);
 
+#if defined(ENABLE_GC_BOEHM)
        Finalizer::attach_custom_finalizer(LLNI_WRAP(t->object), thread_cleanup_finalizer, t);
+#endif
 
        thread_set_state_runnable(t);