/[slime]/slime/swank-sbcl.lisp
ViewVC logotype

Diff of /slime/swank-sbcl.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.59 by heller, Sat Jan 31 11:50:25 2004 UTC revision 1.60 by heller, Sat Jan 31 20:17:19 2004 UTC
# Line 1  Line 1 
1  <;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-  ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
2  ;;;  ;;;
3  ;;; swank-sbcl.lisp --- SLIME backend for SBCL.  ;;; swank-sbcl.lisp --- SLIME backend for SBCL.
4  ;;;  ;;;
# Line 39  Line 39 
39  (eval-when (:compile-toplevel :load-toplevel :execute)  (eval-when (:compile-toplevel :load-toplevel :execute)
40    (require 'sb-bsd-sockets)    (require 'sb-bsd-sockets)
41    (require 'sb-introspect)    (require 'sb-introspect)
42      (require 'sb-posix)
43    )    )
44    
45  (declaim (optimize (debug 3)))  (declaim (optimize (debug 3)))
# Line 83  Line 84 
84    "List of (key . fn) pairs to be called on SIGIO.")    "List of (key . fn) pairs to be called on SIGIO.")
85    
86  (defun sigio-handler (signal code scp)  (defun sigio-handler (signal code scp)
87    (mapc (lambda (handler) (funcall (cdr handler))) *sigio-handlers*))    (declare (ignore signal code scp))
88      (mapc (lambda (handler)
89              (funcall (the function (cdr handler))))
90            *sigio-handlers*))
91    
92    
93  (defun set-sigio-handler ()  (defun set-sigio-handler ()
# Line 109  Line 113 
113        (sb-alien:alien-funcall fcntl fd +f_setown+ (sb-unix:unix-getpid))        (sb-alien:alien-funcall fcntl fd +f_setown+ (sb-unix:unix-getpid))
114        (push (cons fd fn) *sigio-handlers*))))        (push (cons fd fn) *sigio-handlers*))))
115    
116    ;;(defimplementation add-input-handler (socket fn)
117    ;;  (let ((fd (socket-fd socket)))
118    ;;    (format *debug-io* "Adding sigio handler: ~S ~%" fd)
119    ;;    (sb-posix:fcntl fd sb-posix::f-setfl sb-posix::o-async)
120    ;;    (sb-posix:fcntl fd sb-posix::f-setown (sb-unix:unix-getpid))
121    ;;    (push (cons fd fn) *sigio-handlers*)))
122    
123  (defimplementation remove-input-handlers (socket)  (defimplementation remove-input-handlers (socket)
124    (let ((fd (socket-fd socket)))    (let ((fd (socket-fd socket)))
125      (setf *sigio-handlers* (delete fd *sigio-handlers* :key #'car))      (setf *sigio-handlers* (delete fd *sigio-handlers* :key #'car))
# Line 634  stack." Line 645  stack."
645    
646    (defvar *mailbox-lock* (sb-thread:make-mutex :name "mailbox lock"))    (defvar *mailbox-lock* (sb-thread:make-mutex :name "mailbox lock"))
647    (defvar *mailboxes* (list))    (defvar *mailboxes* (list))
648      (declaim (type list *mailboxes*))
649    
650    (defstruct (mailbox (:conc-name mailbox.))    (defstruct (mailbox (:conc-name mailbox.))
651      thread      thread

Legend:
Removed from v.1.59  
changed lines
  Added in v.1.60

  ViewVC Help
Powered by ViewVC 1.1.5