From: Simon Marlow Date: Thu, 19 Oct 2006 10:11:02 +0000 (+0000) Subject: remove performGCWithRoots() X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=3633e894a07a1d198dfc964c51024853c2c96537 remove performGCWithRoots() 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. --- diff --git a/includes/RtsExternal.h b/includes/RtsExternal.h index da03bb4..3000059 100644 --- a/includes/RtsExternal.h +++ b/includes/RtsExternal.h @@ -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); diff --git a/rts/Schedule.c b/rts/Schedule.c index 0e54b65..571d02b 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -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