Changeset 14814 for trunk/source/level-1


Ignore:
Timestamp:
Jun 6, 2011, 9:13:40 PM (8 years ago)
Author:
rme
Message:

In %parse-token, use with-package-lock instead of without-interrupts.

The little section of code in question is basically an inlined version
of %intern (which has used with-package-lock all along). When
multiple threads are involved, these two pieces of code can get in
each other's way.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-reader.lisp

    r14689 r14814  
    24732473                    (let* ((pkg (if explicit-package (pkg-arg explicit-package) *package*)))
    24742474                      (if (or double-colon (eq pkg *keyword-package*))
    2475                         (without-interrupts
    2476                          (multiple-value-bind (symbol access internal-offset external-offset)
    2477                                               (%find-symbol string len pkg)
    2478                            (if access
    2479                              symbol
    2480                              (%add-symbol (%string-from-token tb) pkg internal-offset external-offset))))
     2475                        (with-package-lock (pkg)
     2476                          (multiple-value-bind (symbol access internal-offset external-offset)
     2477                              (%find-symbol string len pkg)
     2478                            (if access
     2479                              symbol
     2480                              (%add-symbol (%string-from-token tb) pkg internal-offset external-offset))))
    24812481                        (multiple-value-bind (found symbol) (%get-htab-symbol string len (pkg.etab pkg))
    24822482                          (if found
Note: See TracChangeset for help on using the changeset viewer.