remove performGCWithRoots()
authorSimon Marlow <simonmar@microsoft.com>
Thu, 19 Oct 2006 10:11:02 +0000 (10:11 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Thu, 19 Oct 2006 10:11:02 +0000 (10:11 +0000)
I don't think this can ever be useful, because to add more roots you
need to do it consistently for every GC.  The right way to add roots
is to use newStablePtr.

includes/RtsExternal.h
rts/Schedule.c

index da03bb4..3000059 100644 (file)
@@ -88,7 +88,6 @@ typedef void (*evac_fn)(StgClosure **);
 
 extern void performGC(void);
 extern void performMajorGC(void);
-extern void performGCWithRoots(void (*get_roots)(evac_fn));
 extern HsInt64 getAllocations( void );
 extern void revertCAFs( void );
 extern void dirty_MUT_VAR(StgRegTable *reg, StgClosure *p);
index 0e54b65..571d02b 100644 (file)
@@ -2670,11 +2670,6 @@ GetRoots( evac_fn evac )
    This is the interface to the garbage collector from Haskell land.
    We provide this so that external C code can allocate and garbage
    collect when called from Haskell via _ccall_GC.
-
-   It might be useful to provide an interface whereby the programmer
-   can specify more roots (ToDo).
-   
-   This needs to be protected by the GC condition variable above.  KH.
    -------------------------------------------------------------------------- */
 
 static void (*extra_roots)(evac_fn);
@@ -2712,13 +2707,6 @@ AllRoots(evac_fn evac)
     extra_roots(evac);         // the user's roots
 }
 
-void
-performGCWithRoots(void (*get_roots)(evac_fn))
-{
-    extra_roots = get_roots;
-    performGC_(rtsFalse, AllRoots);
-}
-
 /* -----------------------------------------------------------------------------
    Stack overflow