1.0.18.16: many STYLE-WARNING changes.
[sbcl.git] / src / code / gc.lisp
index bc6f6cd..e6abbb1 100644 (file)
         ;; See comment in interr.lisp
         *heap-exhausted-error-condition* (make-condition 'heap-exhausted-error)))
 
-(declaim (ftype (function () unsigned-byte) get-bytes-consed))
+(declaim (ftype (sfunction () unsigned-byte) get-bytes-consed))
 (defun get-bytes-consed ()
   #!+sb-doc
   "Return the number of bytes consed since the program began. Typically
@@ -198,7 +198,7 @@ run in any thread.")
 
 (defun sub-gc (&key (gen 0))
   (unless (eq sb!thread:*current-thread*
-              (sb!thread::mutex-value *already-in-gc*))
+              (sb!thread:mutex-value *already-in-gc*))
     ;; With gencgc, unless *GC-PENDING* every allocation in this
     ;; function triggers another gc, potentially exceeding maximum
     ;; interrupt nesting. If *GC-INHIBIT* is not true, however,
@@ -248,11 +248,7 @@ run in any thread.")
            ;; for finalizers and after-gc hooks.
            (when (sb!thread:thread-alive-p sb!thread:*current-thread*)
              (run-pending-finalizers)
-             (dolist (hook *after-gc-hooks*)
-               (handler-case
-                   (funcall hook)
-                 (serious-condition (c)
-                   (warn "Error calling after-GC hook ~S:~% ~A" hook c)))))))))
+             (call-hooks "after-GC" *after-gc-hooks* :on-error :warn))))))
 
 ;;; This is the user-advertised garbage collection function.
 (defun gc (&key (gen 0) (full nil) &allow-other-keys)