X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fgc.lisp;h=9bc64ee3c90935b1eb7c0d8855d506ae37a8692c;hb=830db48da09c88c0e91b11e2991d21b2a1af2579;hp=b9d7fb1e930a4383792b8401782452ae0456e550;hpb=47eb330ef0f3b99d24c0e24d897b757f16950c4b;p=sbcl.git diff --git a/src/code/gc.lisp b/src/code/gc.lisp index b9d7fb1..9bc64ee 100644 --- a/src/code/gc.lisp +++ b/src/code/gc.lisp @@ -250,16 +250,20 @@ environment these hooks may run in any thread.") (sb!alien:unsigned 32)) val)) +(declaim (inline maybe-handle-pending-gc)) +(defun maybe-handle-pending-gc () + (when (and (not *gc-inhibit*) + (or #!+sb-thread *stop-for-gc-pending* + *gc-pending*)) + (sb!unix::receive-pending-interrupt))) + ;;; These work both regardless of whether we're inside WITHOUT-GCING ;;; or not. (defun gc-on () #!+sb-doc "Enable the garbage collector." (setq *gc-inhibit* nil) - (when (and (not *gc-inhibit*) - (or #!+sb-thread *stop-for-gc-pending* - *gc-pending*)) - (sb!unix::receive-pending-interrupt)) + (maybe-handle-pending-gc) nil) (defun gc-off ()