Skip to content

Revert "cmp: execute cleanup forms of unwind-protect with interrupts disabled"

Daniel Kochmański requested to merge revert-cleanup-up into develop

This reverts commit b8df7a77.

Commit introduced protection of cleanup forms. That caused a regression that in console (i.e not slime) ext:*interrupts-enabled* was bound to NIL (what breaks loading some software from the terminal most notably lparallel as well as makes interrupts unusable, like a timeout).

I'd look which unwind-protect causes that, but initial investigation shown, that we already have estabilished track of handling unprotected unwind-protect forms in mp.lisp module (and I like that approach better than being overly protective):

    (without-interrupts
           (unwind-protect
                (with-restored-interrupts
                    (mp::get-lock ,lock)
                  (locally ,@body))
             (let ((,process mp:*current-process*))
               (declare (optimize (speed 3) (safety 0) (debug 0)))
               (when (and (eq ,process (mp:lock-owner ,lock))
                          (or (not (eq ,owner ,process))
                              (> (the fixnum (mp:lock-count ,lock))
                                 (the fixnum ,count))))
                 (mp::giveup-lock ,lock)))))

Merge request reports