* Logical hosts.
* TRACE.
* Instrumenting profiler.
* Mapping over *PACKAGE-NAMES*.
;;; a hash table that maps each traced function to the TRACE-INFO. The
;;; entry for a closure is the shared function entry object.
-(defvar *traced-funs* (make-hash-table :test 'eq))
+(defvar *traced-funs* (make-hash-table :test 'eq :synchronized t))
;;; A TRACE-INFO object represents all the information we need to
;;; trace a given function.
(make-hash-table
;; EQL testing isn't good enough for generalized function names
;; like (SETF FOO).
- :test 'equal))
+ :test 'equal
+ :synchronized t))
(defstruct (profile-info (:copier nil))
(name (missing-arg) :read-only t)
(encapsulated-fun (missing-arg) :type function :read-only t)
;;; 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
;;; Hash table searching maps a logical pathname's host to its
;;; physical pathname translation.
-(defvar *logical-hosts* (make-hash-table :test 'equal))
+(defvar *logical-hosts* (make-hash-table :test 'equal :synchronized t))
\f
;;;; patterns
;;; a new one if necessary.
(defun intern-logical-host (thing)
(declare (values logical-host))
- (or (find-logical-host thing nil)
- (let* ((name (logical-word-or-lose thing))
- (new (make-logical-host :name name)))
- (setf (gethash name *logical-hosts*) new)
- new)))
+ (with-locked-hash-table (*logical-hosts*)
+ (or (find-logical-host thing nil)
+ (let* ((name (logical-word-or-lose thing))
+ (new (make-logical-host :name name)))
+ (setf (gethash name *logical-hosts*) new)
+ new))))
\f
;;;; logical pathname parsing
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.11.23"
+"1.0.11.24"