Changeset 6193


Ignore:
Timestamp:
Apr 8, 2007, 3:58:08 AM (12 years ago)
Author:
gb
Message:

%TCR-INTERRUPT: don't signal if interrupt is obviously pending.

File:
1 edited

Legend:

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

    r5978 r6193  
    349349
    350350(defun %tcr-interrupt (tcr)
    351   (with-macptrs (tcrp)
    352     (%setf-macptr-to-object tcrp tcr)
    353     (ff-call
    354      (%kernel-import target::kernel-import-raise-thread-interrupt)
    355      :address tcrp
    356      :signed-fullword)))
     351  ;; The other thread's interrupt-pending flag might get cleared
     352  ;; right after we look and see it set, but since this is called
     353  ;; with the lock on the thread's interrupt queue held, the
     354  ;; pending interrupt won't have been taken yet.
     355  ;; When a thread dies, it should try to clear its interrupt-pending
     356  ;; flag.
     357  (or (not (eql 0 (%fixnum-ref tcr target::tcr.interrupt-pending)))
     358      (with-macptrs (tcrp)
     359        (%setf-macptr-to-object tcrp tcr)
     360        (ff-call
     361         (%kernel-import target::kernel-import-raise-thread-interrupt)
     362         :address tcrp
     363         :signed-fullword))))
     364
    357365
    358366
Note: See TracChangeset for help on using the changeset viewer.