0.9.3.41: gc trigger
authorGabor Melis <mega@hotpop.com>
Thu, 11 Aug 2005 14:44:16 +0000 (14:44 +0000)
committerGabor Melis <mega@hotpop.com>
Thu, 11 Aug 2005 14:44:16 +0000 (14:44 +0000)
commit47eb330ef0f3b99d24c0e24d897b757f16950c4b
tree45ccfcf49ebe2dcf7350b3bef82a88c678384130
parent56156b04b951e2a85c6150a2053e9bc9ba3ee976
0.9.3.41: gc trigger

  * implementation changes

    The *NEED-TO-COLLECT-GARBAGE* special is gone. A similar - but
    per-thread - special: *GC-PENDING* is here. It is set by both gencgc
    and cheneygc trigger.

    In threaded builds SIG_STOP_FOR_GC is no longer deferrable by the
    normal deferral mechanism and rules. It is only deferred in pseudo
    atomic sections and when *GC-INHIBIT*. There is another
    per-thread special for this purpose: *STOP-FOR-GC-PENDING*.

    Whenever *GC-INHI-BIT* is cleared (either by a GC-ON or when exiting
    a WITHOUT-GCING) the pending gc or the signal handler is run:

      (when (and (not *gc-inhibit*)
                 (or #!+sb-thread *stop-for-gc-pending*
                     *gc-pending*))
        (sb!unix::receive-pending-interrupt))

    On the receiving side interrupt_handle_pending is made clever enough
    not to run pending handlers whose time has not come (i.e. in a
    WITHOUT-INTERRUPTS it only does gc and leaves the pending handlers
    alone).

  * the bugs fixed

    ** WITHOUT-INTERRUPTS no longer blocks gc from the current or other
       threads.

    ** WITHOUT-GCING on the other hand correctly defers gc, be it
       automatically triggered or explicitly called, and SIG_STOP_FOR_GC.

    ** GC-{ON,OFF} now work within WITHOUT-GCING, too

    ** the gc trigger is more reliable as it does not share the
       interrupt deferral mechanism, most notably sb-sprof does not make
       triggering gc any harder
23 files changed:
NEWS
package-data-list.lisp-expr
src/code/cold-init.lisp
src/code/gc.lisp
src/code/globals.lisp
src/code/sysmacs.lisp
src/code/target-signal.lisp
src/code/target-thread.lisp
src/code/toplevel.lisp
src/compiler/alpha/parms.lisp
src/compiler/hppa/parms.lisp
src/compiler/mips/parms.lisp
src/compiler/ppc/parms.lisp
src/compiler/sparc/parms.lisp
src/compiler/x86-64/parms.lisp
src/compiler/x86/parms.lisp
src/runtime/alloc.c
src/runtime/gencgc.c
src/runtime/interrupt.c
src/runtime/interrupt.h
src/runtime/thread.c
tests/gc.impure.lisp [new file with mode: 0644]
version.lisp-expr