Changeset 6111


Ignore:
Timestamp:
Mar 28, 2007, 11:33:28 AM (13 years ago)
Author:
gb
Message:

Do locking when maintaining the auto-export-packages list.

After %INSERT-SYMBOL adds a new symbol to a package, call the package's
intern-hook if it has one.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/objc-gf/ccl/level-0/nfasload.lisp

    r6047 r6111  
    985985
    986986
    987 (let* ((force-export-packages (list *keyword-package*)))
     987(let* ((force-export-packages (list *keyword-package*))
     988       (force-export-packages-lock (make-lock)))
    988989  (defun force-export-packages ()
    989     force-export-packages)
     990    (with-lock-grabbed (force-export-packages-lock)
     991      (copy-list force-export-packages)))
    990992  (defun package-force-export (p)
    991993    (let* ((pkg (pkg-arg p)))
    992     (pushnew pkg force-export-packages)
    993     pkg)))
     994      (with-lock-grabbed (force-export-packages-lock)
     995        (pushnew pkg force-export-packages))
     996    pkg))
     997  (defun force-export-package-p (pkg)
     998    (with-lock-grabbed (force-export-packages-lock)
     999      (if (memq pkg force-export-packages)
     1000        t))))
    9941001
    9951002
     
    10031010        (unless (%car package-predicate) (%rplaca package-predicate package)))
    10041011      (setf (%svref symvec target::symbol.package-predicate-cell) package))
    1005     (if (or force-export (memq package (force-export-packages)))
     1012    (if (or force-export (force-export-package-p package))
    10061013      (progn
    10071014        (%htab-add-symbol symbol (pkg.etab package) external-idx)
     
    10151022                                  (the fixnum (%symbol-bits symbol)))))))
    10161023      (%htab-add-symbol symbol (pkg.itab package) internal-idx))
     1024    (let* ((hook (pkg.intern-hook package)))
     1025      (when hook (funcall hook symbol)))
    10171026    symbol))
    10181027
Note: See TracChangeset for help on using the changeset viewer.