Changeset 11482
- Timestamp:
- Dec 8, 2008, 5:15:49 PM (12 years ago)
- Location:
- branches/working-0711/ccl
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/working-0711/ccl/level-0/X86/x86-misc.lisp
r11164 r11482 622 622 623 623 624 (defx86lapfunction break-event-pending-p()624 (defx86lapfunction pending-user-interrupt () 625 625 (xorq (% imm0) (% imm0)) 626 (ref-global x8664::intflag imm1) 626 (ref-global x8664::intflag arg_z) 627 ;; If another signal happens now, it will get ignored, same as if it happened 628 ;; before whatever signal is in arg_z. But then these are async signals, so 629 ;; who can be sure it didn't actually happen just before... 627 630 (set-global imm0 x8664::intflag) 628 (testq (% imm1) (% imm1))629 (setne (%b imm0))630 (andl ($ x8664::t-offset) (%l imm0))631 (lea (@ (target-nil-value) (% imm0)) (% arg_z))632 631 (single-value-return)) 633 632 -
branches/working-0711/ccl/level-1/l1-events.lisp
r11074 r11482 118 118 (clear-input *terminal-io*)))))) 119 119 120 121 120 (defglobal *quit-interrupt-hook* nil) 121 122 (defun force-async-quit () 123 (when *quit-interrupt-hook* 124 (funcall *quit-interrupt-hook*)) 125 (quit 143)) 122 126 123 127 (defstatic *running-periodic-tasks* nil) … … 143 147 (when (functionp f) (funcall f))))))) 144 148 149 (defconstant $user-interrupt-break 1) 150 (defconstant $user-interrupt-quit 2) 151 145 152 (defun housekeeping () 146 153 (progn 147 154 (handle-gc-hooks) 148 155 (unless *inhibit-abort* 149 (when (break-event-pending-p) 150 (let* ((proc (select-interactive-abort-process))) 151 (if proc 152 (force-break-in-listener proc))))) 156 (let ((id (pending-user-interrupt))) 157 (cond ((eql id $user-interrupt-quit) 158 ;; Doesn't matter where it happens, but try to use a process that 159 ;; has a shot at reporting any problems in user hook. 160 (let* ((proc (or (select-interactive-abort-process) 161 *initial-process*))) 162 (process-interrupt proc #'force-async-quit))) 163 ((eql id $user-interrupt-break) 164 (let* ((proc (select-interactive-abort-process))) 165 (if proc 166 (force-break-in-listener proc))))))) 153 167 (flet ((maybe-run-periodic-task (task) 154 168 (let ((now (get-tick-count)) -
branches/working-0711/ccl/lib/ccl-export-syms.lisp
r11279 r11482 65 65 *backtrace-format* 66 66 *quit-on-eof* 67 *quit-interrupt-hook* 67 68 macroexpand-all 68 69 compiler-macroexpand -
branches/working-0711/ccl/lisp-kernel/pmcl-kernel.c
r11412 r11482 730 730 731 731 void 732 sigint_handler (int signum, siginfo_t *info, ExceptionInformation *context)732 user_signal_handler (int signum, siginfo_t *info, ExceptionInformation *context) 733 733 { 734 734 if (signum == SIGINT) { 735 735 lisp_global(INTFLAG) = (1 << fixnumshift); 736 736 } 737 else if (signum == SIGTERM) { 738 lisp_global(INTFLAG) = (2 << fixnumshift); 739 } 737 740 #ifdef DARWIN 738 741 DarwinSigReturn(context); … … 742 745 743 746 void 744 register_ sigint_handler()747 register_user_signal_handler() 745 748 { 746 749 #ifdef WINDOWS … … 751 754 SetConsoleCtrlHandler(ControlEventHandler,TRUE); 752 755 #else 753 install_signal_handler(SIGINT, (void *)sigint_handler); 756 install_signal_handler(SIGINT, (void *)user_signal_handler); 757 install_signal_handler(SIGTERM, (void *)user_signal_handler); 754 758 #endif 755 759 } … … 1672 1676 lisp_global(EXCEPTION_LOCK) = ptr_to_lispobj(new_recursive_lock()); 1673 1677 enable_fp_exceptions(); 1674 register_ sigint_handler();1678 register_user_signal_handler(); 1675 1679 1676 1680 #ifdef PPC
Note: See TracChangeset
for help on using the changeset viewer.