rev 41 - trunk/gc

jimb at sanpietro.red-bean.com jimb at sanpietro.red-bean.com
Wed Aug 6 22:40:24 CDT 2003


Author: jimb
Date: 2003-08-06 22:40:21 -0500 (Wed, 06 Aug 2003)
New Revision: 41

Modified:
   trunk/gc/refs.h
Log:
* gc/refs.h: Notes about how to simplify the GC's interface.


Modified: trunk/gc/refs.h
===================================================================
--- trunk/gc/refs.h	2003-08-05 07:25:29 UTC (rev 40)
+++ trunk/gc/refs.h	2003-08-07 03:40:21 UTC (rev 41)
@@ -10,6 +10,30 @@
 #include "minor/minor.h"
 #include "tagged.h"
 
+/* Restructure:
+
+   The GC shouldn't care about calls; its interface should simply be
+   functions that create and destroy ref groups.
+
+   The GC should have a global list of threads that might be running
+   Scheme code.  Each thread should have a flag indicating whether:
+
+   - its current Scheme continuation is one explicitly saved
+     (i.e. we're running C code at the moment, and that C code uses
+     refs for everything), or
+
+   - its current registers are its continuation (i.e. start with
+     regs in the sigcontext)
+
+   We can then build the mn_call stuff on top of this abstraction.
+
+   It's true that the global list of threads, with each thread's list
+   of calls and their associated ref groups, plus the single global
+   ref group, contains the same information that the global list of
+   ref groups does.  That is, you can find all ref groups either way.
+   Big deal; it's worth duplicating a few pointer fields to 1) reduce
+   the complexity of the GC, and 2) simplify the locking rules.  */
+
 /* To do:
 
    We want to protect C->Scheme and Scheme->C calls with a mutex.  For





More information about the Minor mailing list