[slime-cvs] CVS slime
heller
heller at common-lisp.net
Wed Aug 27 17:53:10 UTC 2008
Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv16620
Modified Files:
ChangeLog swank-cmucl.lisp swank.lisp
Log Message:
* swank-cmucl.lisp (remove-sigio-handlers): Fix thinko.
--- /project/slime/cvsroot/slime/ChangeLog 2008/08/27 17:53:03 1.1476
+++ /project/slime/cvsroot/slime/ChangeLog 2008/08/27 17:53:08 1.1477
@@ -5,6 +5,8 @@
2008-08-27 Helmut Eller <heller at common-lisp.net>
+ * swank-cmucl.lisp (remove-sigio-handlers): Fix thinko.
+
* swank.lisp (decode-message): Don't ignore EOF.
(swank-debugger-hook): Remove the default-debugger restart.
--- /project/slime/cvsroot/slime/swank-cmucl.lisp 2008/08/22 21:15:19 1.189
+++ /project/slime/cvsroot/slime/swank-cmucl.lisp 2008/08/27 17:53:08 1.190
@@ -169,19 +169,19 @@
(fcntl fd unix:f-setown (unix:unix-getpid))
(let ((old-flags (fcntl fd unix:f-getfl 0)))
(fcntl fd unix:f-setfl (logior old-flags unix:fasync)))
+ (assert (not (assoc fd *sigio-handlers*)))
(push (cons fd fn) *sigio-handlers*)))
(defimplementation remove-sigio-handlers (socket)
(let ((fd (socket-fd socket)))
- (unless (assoc fd *sigio-handlers*)
+ (when (assoc fd *sigio-handlers*)
(setf *sigio-handlers* (remove fd *sigio-handlers* :key #'car))
(let ((old-flags (fcntl fd unix:f-getfl 0)))
(fcntl fd unix:f-setfl (logandc2 old-flags unix:fasync)))
(sys:invalidate-descriptor fd))
- #+(or)
+ (assert (not (assoc fd *sigio-handlers*)))
(when (null *sigio-handlers*)
- (sys:default-interrupt :sigio))
- ))
+ (sys:default-interrupt :sigio))))
;;;;; SERVE-EVENT
--- /project/slime/cvsroot/slime/swank.lisp 2008/08/27 17:53:03 1.578
+++ /project/slime/cvsroot/slime/swank.lisp 2008/08/27 17:53:08 1.579
@@ -357,6 +357,7 @@
(check-slime-interrupts)))))
(defun invoke-or-queue-interrupt (function)
+ (log-event "invoke-or-queue-interrupt: ~a" function)
(cond ((not (boundp '*slime-interrupts-enabled*))
(without-slime-interrupts
(funcall function)))
@@ -365,6 +366,7 @@
((cdr *pending-slime-interrupts*)
(simple-break "Two many queued interrupts"))
(t
+ (log-event "queue-interrupt: ~a" function)
(push function *pending-slime-interrupts*))))
(defslimefun simple-break (&optional (datum "Interrupt from Emacs") &rest args)
@@ -931,6 +933,7 @@
(defun close-connection (c condition backtrace)
(let ((*debugger-hook* nil))
+ (log-event "close-connection: ~a ...~%" condition)
(format *log-output* "~&;; swank:close-connection: ~A~%" condition)
(let ((cleanup (connection.cleanup c)))
(when cleanup
@@ -956,8 +959,8 @@
(ignore-errors (stream-external-format (connection.socket-io c)))
(connection.communication-style c)
*use-dedicated-output-stream*)
- (finish-output *log-output*))))
-
+ (finish-output *log-output*))
+ (log-event "close-connection ~a ... done.~%" condition)))
;;;;;; Thread based communication
@@ -1158,6 +1161,8 @@
(lambda () (process-io-interrupt connection)))
(handle-or-process-requests connection))
+(defvar *io-interupt-level* 0)
+
(defun process-io-interrupt (connection)
(log-event "process-io-interrupt ~d ...~%" *io-interupt-level*)
(let ((*io-interupt-level* (1+ *io-interupt-level*)))
@@ -1174,7 +1179,7 @@
(defun deinstall-sigio-handler (connection)
(log-event "deinstall-sigio-handler...~%")
- (remove-sigio-handlers (connection.socket-io connection))
+ (remove-sigio-handlers (connection.socket-io connection))
(log-event "deinstall-sigio-handler...done~%"))
;;;;;; SERVE-EVENT based IO
More information about the slime-cvs
mailing list