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

Diff of /slime/swank-backend.lisp

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

revision 1.94 by heller, Sun Nov 20 23:25:38 2005 UTC revision 1.98 by nsiivola, Wed Apr 12 08:43:55 2006 UTC
# Line 84  Line 84 
84     #:slot-definition-type     #:slot-definition-type
85     #:slot-definition-readers     #:slot-definition-readers
86     #:slot-definition-writers     #:slot-definition-writers
87       #:slot-boundp-using-class
88       #:slot-value-using-class
89     ;; generic function protocol     ;; generic function protocol
90     #:compute-applicable-methods-using-classes     #:compute-applicable-methods-using-classes
91     #:finalize-inheritance))     #:finalize-inheritance))
# Line 212  EXCEPT is a list of symbol names which s Line 214  EXCEPT is a list of symbol names which s
214    "Close the socket SOCKET.")    "Close the socket SOCKET.")
215    
216  (definterface accept-connection (socket &key external-format  (definterface accept-connection (socket &key external-format
217                                          buffering)                                          buffering timeout)
218     "Accept a client connection on the listening socket SOCKET.     "Accept a client connection on the listening socket SOCKET.
219  Return a stream for the new connection.")  Return a stream for the new connection.")
220    
# Line 232  Return a stream for the new connection." Line 234  Return a stream for the new connection."
234    "Return one of the symbols :spawn, :sigio, :fd-handler, or NIL."    "Return one of the symbols :spawn, :sigio, :fd-handler, or NIL."
235    nil)    nil)
236    
237    (definterface set-stream-timeout (stream timeout)
238      "Set the 'stream 'timeout.  The timeout is either the real number
239      specifying the timeout in seconds or 'nil for no timeout."
240      (declare (ignore stream timeout))
241      nil)
242    
243  ;;; Base condition for networking errors.  ;;; Base condition for networking errors.
244  (define-condition network-error (simple-error) ())  (define-condition network-error (simple-error) ())
245    
# Line 313  Example: Line 321  Example:
321    (unless (member :asdf *features*)    (unless (member :asdf *features*)
322      (error "ASDF is not loaded."))      (error "ASDF is not loaded."))
323    (with-compilation-hooks ()    (with-compilation-hooks ()
324      (let ((operate (find-symbol "OPERATE" :asdf))      (let ((operate (find-symbol (symbol-name '#:operate) :asdf))
325            (operation (find-symbol operation-name :asdf)))            (operation (find-symbol operation-name :asdf)))
326        (when (null operation)        (when (null operation)
327          (error "Couldn't find ASDF operation ~S" operation-name))          (error "Couldn't find ASDF operation ~S" operation-name))
# Line 828  Only one thread may hold the lock (via C Line 836  Only one thread may hold the lock (via C
836              (type function function))              (type function function))
837     (funcall function))     (funcall function))
838    
839    (definterface make-recursive-lock (&key name)
840      "Make a lock for thread synchronization.
841    Only one thread may hold the lock (via CALL-WITH-RECURSIVE-LOCK-HELD)
842    at a time, but that thread may hold it more than once."
843      (cons nil (make-lock :name name)))
844    
845    (definterface call-with-recursive-lock-held (lock function)
846      "Call FUNCTION with LOCK held, queueing if necessary."
847      (if (eql (car lock) (current-thread))
848          (funcall function)
849          (call-with-lock-held (cdr lock)
850                               (lambda ()
851                                 (unwind-protect
852                                      (progn
853                                        (setf (car lock) (current-thread))
854                                        (funcall function))
855                                   (setf (car lock) nil))))))
856    
857  (definterface current-thread ()  (definterface current-thread ()
858    "Return the currently executing thread."    "Return the currently executing thread."
859    0)    0)

Legend:
Removed from v.1.94  
changed lines
  Added in v.1.98

  ViewVC Help
Powered by ViewVC 1.1.5