Add register-gc-event, deregister-gc-event, registered-gc-event.
authorMatt Birkholz <puck@birchwood-abbey.net>
Tue, 18 Aug 2015 00:19:15 +0000 (17:19 -0700)
committerMatt Birkholz <puck@birchwood-abbey.net>
Sun, 3 Jan 2016 20:06:11 +0000 (13:06 -0700)
commit1d15962559677b00b0c931131c86e320c393fe87
treea1deaaddf7ac704f89bfbd26c59eba5845012230
parent0c70df0a481a0ad313cda6412458636eacda998a
Add register-gc-event, deregister-gc-event, registered-gc-event.

Punt the hook/record-statistic! fluid.  With-gc-notification now uses
dynamic-wind to register and deregister a GC thread event for the
current thread.

Do not use ANY fluid state (e.g. nearest-cmdl/port) during a GC.  Use
the console-i/o-port in hook/gc-start and hook/gc-finish.  GCs can
happen in the thread system when there is no current thread.

The fluid state IS defined during the GC thread events.  At the start
of such events, signal a REPL abort if the heap is low.
src/runtime/gc.scm
src/runtime/gcnote.scm
src/runtime/gcstat.scm
src/runtime/make.scm
src/runtime/runtime.pkg
src/runtime/thread.scm