X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fboot.lisp;h=526229f7cf3280af0c42fe2b71576ce52b41cf3b;hb=f73aadf04d841e0f1bfede4c11a13c4ba5c4e264;hp=c8f991281f02cf20263fb7452dea9b98a93318c4;hpb=990728854b8ba017888811d1b0453b15dfa8a581;p=sbcl.git diff --git a/src/pcl/boot.lisp b/src/pcl/boot.lisp index c8f9912..526229f 100644 --- a/src/pcl/boot.lisp +++ b/src/pcl/boot.lisp @@ -2090,10 +2090,15 @@ bootstrapping. (let ((new-state (if (and dfun (or cache info)) (list* dfun cache info) dfun))) - (if (eq *boot-state* 'complete) - (setf (safe-gf-dfun-state gf) new-state) - (setf (clos-slots-ref (get-slots gf) *sgf-dfun-state-index*) - new-state))) + (cond + ((eq *boot-state* 'complete) + ;; Check that we are under the lock. + #+sb-thread + (aver (eq sb-thread:*current-thread* (sb-thread::spinlock-value (gf-lock gf)))) + (setf (safe-gf-dfun-state gf) new-state)) + (t + (setf (clos-slots-ref (get-slots gf) *sgf-dfun-state-index*) + new-state)))) dfun) (defun gf-dfun-cache (gf)