(declare (function function))
;; FIXME: Since name conflicts can be signalled while holding the
;; mutex, user code can be run leading to lock ordering problems.
- ;;
- ;; This used to be a spinlock, but there it can be held for a long
- ;; time while the debugger waits for user input.
(sb!thread:with-recursive-lock (*package-graph-lock*)
(funcall function)))
(defmacro with-package-names ((names &key) &body body)
`(let ((,names *package-names*))
- (with-locked-hash-table (,names)
+ (with-locked-system-table (,names)
,@body)))
\f
;;;; PACKAGE-HASHTABLE stuff
(cerror "Clobber existing package."
"A package named ~S already exists" name)
(setf clobber t))
- (with-packages ()
+ (with-package-graph ()
;; Check for race, signal the error outside the lock.
(when (and (not clobber) (find-package name))
(go :restart))