X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftarget-pathname.lisp;h=f32e656cce224b6f2cb8c0d8f75732bf93465e21;hb=b1cd84e0503ff29d72a860ea1709c87f721412ed;hp=6f8f1a0c2fff67dcc8f7ad82409bf981dd503f59;hpb=a02c31dc76ffa8ae4f014cd01be7ffe9e47113be;p=sbcl.git diff --git a/src/code/target-pathname.lisp b/src/code/target-pathname.lisp index 6f8f1a0..f32e656 100644 --- a/src/code/target-pathname.lisp +++ b/src/code/target-pathname.lisp @@ -111,7 +111,7 @@ ;;; 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)) ;;;; patterns @@ -1338,11 +1338,12 @@ PARSE-NAMESTRING." ;;; 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)))) ;;;; logical pathname parsing