;;; core image
(defconstant +package-hashtable-image-load-factor+ 0.5)
-;;; All destructive package modifications are serialized on this lock.
+;;; All destructive package modifications are serialized on this lock,
+;;; plus iterations on *PACKAGE-NAMES*.
(defvar *package-lock*)
(!cold-init-forms
#!+sb-doc
"Return a list of all existing packages."
(let ((res ()))
- (maphash (lambda (k v)
- (declare (ignore k))
- (pushnew v res))
- *package-names*)
+ (with-packages ()
+ (maphash (lambda (k v)
+ (declare (ignore k))
+ (pushnew v res))
+ *package-names*))
res))
\f
(defun intern (name &optional (package (sane-package)))
"Return a list of all symbols in the system having the specified name."
(let ((string (string string-or-symbol))
(res ()))
- (maphash (lambda (k v)
- (declare (ignore k))
- (multiple-value-bind (s w) (find-symbol string v)
- (when w (pushnew s res))))
- *package-names*)
+ (with-packages ()
+ (maphash (lambda (k v)
+ (declare (ignore k))
+ (multiple-value-bind (s w) (find-symbol string v)
+ (when w (pushnew s res))))
+ *package-names*))
res))
\f
;;;; APROPOS and APROPOS-LIST