Changeset 465


Ignore:
Timestamp:
Feb 2, 2004, 8:12:54 AM (21 years ago)
Author:
Gary Byers
Message:

Disable interrupts when accessing the termination queue; may need to
inhibit GC as well.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-1/l1-lisp-threads.lisp

    r422 r465  
    11971197  (let ((new-cell (list (cons object function)))
    11981198        (population *termination-population*))
    1199     (with-lock-grabbed (*termination-population-lock*)
    1200      (setf (cdr new-cell) (population-data population)
    1201            (population-data population) new-cell))
     1199    (without-interrupts
     1200     (with-lock-grabbed (*termination-population-lock*)
     1201       (setf (cdr new-cell) (population-data population)
     1202             (population-data population) new-cell)))
    12021203    function))
    12031204
     
    12091210        (population *termination-population*))
    12101211    (loop
     1212    (without-interrupts
    12111213      (with-lock-grabbed (*termination-population-lock*)
    12121214       (let ((list (population-termination-list population)))
    12131215         (unless list (return))
    12141216         (setf cell (car list)
    1215                (population-termination-list population) (cdr list))))
     1217               (population-termination-list population) (cdr list)))))
    12161218      (funcall (cdr cell) (car cell)))))
    12171219
     
    12241226                  (setq found-it? t))))
    12251227      (declare (dynamic-extent #'test))
    1226       (with-lock-grabbed (*termination-population-lock*)
    1227        (setf (population-data *termination-population*)
    1228              (delete object (population-data *termination-population*)
    1229                      :test #'test
    1230                      :count 1)))
     1228      (without-interrupts
     1229       (with-lock-grabbed (*termination-population-lock*)
     1230         (setf (population-data *termination-population*)
     1231               (delete object (population-data *termination-population*)
     1232                       :test #'test
     1233                       :count 1))))
    12311234      found-it?)))
    12321235
    12331236(defun termination-function (object)
    1234   (with-lock-grabbed (*termination-population-lock*)
    1235     (cdr (assq object (population-data *termination-population*)))))
     1237  (without-interrupts
     1238   (with-lock-grabbed (*termination-population-lock*)
     1239     (cdr (assq object (population-data *termination-population*))))))
    12361240
    12371241(defun do-automatic-termination ()
Note: See TracChangeset for help on using the changeset viewer.