Changeset 12424 for trunk/source/level-1


Ignore:
Timestamp:
Jul 17, 2009, 10:09:37 AM (10 years ago)
Author:
gb
Message:

Don't hold *CALLBACK-LOCK* so long in DEFINE-CALLBACK-FUNCTION;
in particular, don't hold it while trying to print when *LOAD-PRINT*
is in effect, since FORCE-OUTPUT in the Cocoa IDE may require the
event thread to execute a callback (and looking up the callback
function needs to hold *CALLBACK-LOCK*). Caused the deadlock in
ticket:559.

File:
1 edited

Legend:

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

    r11590 r12424  
    6060          (setq trampoline (make-callback-trampoline index info))
    6161          (setf (%svref %pascal-functions% index)
    62                 (%cons-pfe trampoline info lisp-function name without-interrupts)))))
    63     ;;(%proclaim-special name)          ;
    64     ;; already done by defpascal expansion
    65     (when name (set name trampoline))
    66     (record-source-file name 'callback)
    67     (when (and doc-string *save-doc-strings*)
    68       (setf (documentation name 'variable) doc-string))
    69     (when *fasload-print* (format t "~&~S~%" name))
    70     (or name trampoline)))
     62                (%cons-pfe trampoline info lisp-function name without-interrupts))))))
     63  ;;(%proclaim-special name)          ;
     64  ;; already done by defpascal expansion
     65  (when name (set name trampoline))
     66  (record-source-file name 'callback)
     67  (when (and doc-string *save-doc-strings*)
     68    (setf (documentation name 'variable) doc-string))
     69  (when *fasload-print* (format t "~&~S~%" name))
     70  (or name trampoline))
    7171
    7272(defun %lookup-pascal-function (index)
Note: See TracChangeset for help on using the changeset viewer.