[slime-cvs] CVS update: slime/swank-lispworks.lisp

Helmut Eller heller at common-lisp.net
Sun Jan 18 20:01:44 UTC 2004


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv8832

Modified Files:
	swank-lispworks.lisp 
Log Message:
(sigint-handler): Bind a continue restart.

(make-dspec-location): Handle stings like pathnames.

Some multithreading support.
Date: Sun Jan 18 15:01:44 2004
Author: heller

Index: slime/swank-lispworks.lisp
diff -u slime/swank-lispworks.lisp:1.15 slime/swank-lispworks.lisp:1.16
--- slime/swank-lispworks.lisp:1.15	Sun Jan 18 02:15:49 2004
+++ slime/swank-lispworks.lisp	Sun Jan 18 15:01:44 2004
@@ -7,7 +7,7 @@
 ;;; This code has been placed in the Public Domain.  All warranties
 ;;; are disclaimed.
 ;;;
-;;;   $Id: swank-lispworks.lisp,v 1.15 2004/01/18 07:15:49 heller Exp $
+;;;   $Id: swank-lispworks.lisp,v 1.16 2004/01/18 20:01:44 heller Exp $
 ;;;
 
 (in-package :swank)
@@ -67,7 +67,8 @@
 
 (defun sigint-handler (&rest args)
   (declare (ignore args))
-  (invoke-debugger "SIGINT"))
+  (with-simple-restart  (continue "Continue from SIGINT handler.")
+    (invoke-debugger "SIGINT")))
 
 (defmethod call-without-interrupts (fn)
   (lispworks:without-interrupts (funcall fn)))
@@ -304,7 +305,7 @@
            (make-location `(:buffer ,buffer) `(:position ,position)))
           (t
            (etypecase location
-             (pathname 
+             ((or pathname string) 
               (make-location `(:file ,(filename location))
                              `(:function-name ,(function-name dspec))))
              ((member :listener)
@@ -378,9 +379,24 @@
 (defslimefun list-callees (symbol-name)
   (lookup-xrefs #'hcl:calls-who symbol-name))
 
-;; (dspec:at-location 
-;;  ('(:inside (:buffer "foo" 34)))
-;;  (defun foofun () (foofun)))
+;;; Multithreading
+
+(defmethod startup-multiprocessing ()
+  (mp:initialize-multiprocessing))
+
+(defmethod spawn (fn &key name)
+  (mp:process-run-function name () fn))
+
+;; XXX: shurtcut
+(defmethod thread-id ()
+  (mp:process-name mp:*current-process*))
+
+(defmethod thread-name (thread-id)
+  thread-id)
+
+(defmethod make-lock (&key name)
+  (mp:make-lock :name name))
+
+(defmethod call-with-lock-held (lock function)
+  (mp:with-lock (lock) (funcall function)))
 
-;; (dspec:find-dspec-locations 'xref-results-for-emacs)
-;; (who-binds '*package*)
\ No newline at end of file





More information about the slime-cvs mailing list