[kaffe] CVS kaffe (guilhem): Fix for boehm-gc kaffe interface.

Kaffe CVS cvs-commits at kaffe.org
Wed Aug 8 14:25:20 PDT 2007


PatchSet 7526 
Date: 2007/08/08 21:24:15
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
Fix for boehm-gc kaffe interface.

        * kaffe/kaffevm/boehm-gc/gc-kaffe.c
        (GC_notify_or_invoke_finalizers): Added declaration of a private
        boehm-gc function.
        (maybe_finalize): Use GC_notify_or_invoke_finalizers instead of
        GC_invoke_finalizers.

        * kaffe/kaffevm/boehm-gc/Makefile.frag: Define GC_THREADS to
        enable the pthread function wrappers.

Members: 
	ChangeLog:1.5024->1.5025 
	kaffe/kaffevm/boehm-gc/Makefile.frag:1.2->1.3 
	kaffe/kaffevm/boehm-gc/gc-kaffe.c:1.5->1.6 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.5024 kaffe/ChangeLog:1.5025
--- kaffe/ChangeLog:1.5024	Wed Aug  8 14:52:34 2007
+++ kaffe/ChangeLog	Wed Aug  8 21:24:15 2007
@@ -1,3 +1,14 @@
+2007-08-08  Guilhem Lavaux  <guilhem at kaffe.org>
+
+	* kaffe/kaffevm/boehm-gc/gc-kaffe.c
+	(GC_notify_or_invoke_finalizers): Added declaration of a private
+	boehm-gc function.
+	(maybe_finalize): Use GC_notify_or_invoke_finalizers instead of
+	GC_invoke_finalizers.
+
+	* kaffe/kaffevm/boehm-gc/Makefile.frag: Define GC_THREADS to
+	enable the pthread function wrappers.
+	
 2007-08-08  Dalibor Topic  <robilad at kaffe.org>
 
 	* kaffe/kaffevm/reference.c (KaffeVM_registerObjectReference,
Index: kaffe/kaffe/kaffevm/boehm-gc/Makefile.frag
diff -u kaffe/kaffe/kaffevm/boehm-gc/Makefile.frag:1.2 kaffe/kaffe/kaffevm/boehm-gc/Makefile.frag:1.3
--- kaffe/kaffe/kaffevm/boehm-gc/Makefile.frag:1.2	Mon Aug  2 10:44:56 2004
+++ kaffe/kaffe/kaffevm/boehm-gc/Makefile.frag	Wed Aug  8 21:24:16 2007
@@ -1 +1 @@
-GC_DEFS= -DKAFFE_BOEHM_GC $(BOEHMGC_SPECIFIC_FLAGS)
+GC_DEFS= -DGC_THREADS -DKAFFE_BOEHM_GC $(BOEHMGC_SPECIFIC_FLAGS)
Index: kaffe/kaffe/kaffevm/boehm-gc/gc-kaffe.c
diff -u kaffe/kaffe/kaffevm/boehm-gc/gc-kaffe.c:1.5 kaffe/kaffe/kaffevm/boehm-gc/gc-kaffe.c:1.6
--- kaffe/kaffe/kaffevm/boehm-gc/gc-kaffe.c:1.5	Tue Aug  7 01:44:49 2007
+++ kaffe/kaffe/kaffevm/boehm-gc/gc-kaffe.c	Wed Aug  8 21:24:16 2007
@@ -30,6 +30,11 @@
 static int GC_kaffe_kind;
 static void ** GC_kaffe_freelist;
 
+/* This function is not exported by Boehm GC. However it is necessary
+ * to defer the finalization of objects and push it to the finalizerMan
+ * thread. */
+extern void GC_notify_or_invoke_finalizers(void);
+
 /* We need a mechanism to release the lock and invoke finalizers.	*/
 /* We don't really have an opportunity to do this on a rarely executed	*/
 /* path on which the lock is not held.  Thus we check at a 		*/
@@ -42,7 +47,7 @@
    static GC_word last_finalized_no = 0;
 
    if (GC_gc_no == last_finalized_no) return;
-   GC_invoke_finalizers();
+   GC_notify_or_invoke_finalizers();
    last_finalized_no = GC_gc_no;
 }
 




More information about the kaffe mailing list