X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fstd-class.lisp;h=9c077f957eb941dc369965068adc945a88a0e24f;hb=508bdb85a65b4530e9d8c4b978539393f64cb234;hp=101a635e78a3e9352e4cdb8fab625f58814262a0;hpb=96aa790ea1d70810e862665c3c8be4ce405a964c;p=sbcl.git diff --git a/src/pcl/std-class.lisp b/src/pcl/std-class.lisp index 101a635..9c077f9 100644 --- a/src/pcl/std-class.lisp +++ b/src/pcl/std-class.lisp @@ -202,18 +202,18 @@ ;;; This needs to be used recursively, in case a non-trivial user ;;; defined ADD/REMOVE-DIRECT-METHOD method ends up calling another ;;; function using the same lock. -(defvar *specializer-lock* (sb-thread::make-spinlock :name "Specializer lock")) +(defvar *specializer-lock* (sb-thread:make-mutex :name "Specializer lock")) (defmethod add-direct-method :around ((specializer specializer) method) ;; All the actions done under this lock are done in an order ;; that is safe to unwind at any point. - (sb-thread::with-recursive-system-spinlock (*specializer-lock*) + (sb-thread::with-recursive-system-lock (*specializer-lock*) (call-next-method))) (defmethod remove-direct-method :around ((specializer specializer) method) ;; All the actions done under this lock are done in an order ;; that is safe to unwind at any point. - (sb-thread::with-recursive-system-spinlock (*specializer-lock*) + (sb-thread::with-recursive-system-lock (*specializer-lock*) (call-next-method))) (defmethod add-direct-method ((specializer class) (method method)) @@ -244,7 +244,7 @@ ;; we behave as if we got just first or just after -- it's just ;; for update that we need to lock. (or (cdr cell) - (sb-thread::with-spinlock (*specializer-lock*) + (sb-thread:with-mutex (*specializer-lock*) (setf (cdr cell) (let (collect) (dolist (m (car cell)) @@ -303,7 +303,7 @@ (entry (gethash object (specializer-method-table specializer)))) (when entry (or (cdr entry) - (sb-thread::with-spinlock (*specializer-lock*) + (sb-thread:with-mutex (*specializer-lock*) (setf (cdr entry) (let (collect) (dolist (m (car entry)) @@ -845,7 +845,8 @@ (defun class-has-a-forward-referenced-superclass-p (class) - (or (forward-referenced-class-p class) + (or (when (forward-referenced-class-p class) + class) (some #'class-has-a-forward-referenced-superclass-p (class-direct-superclasses class))))