[closure-cvs] CVS closure/src/glisp

dlichteblau dlichteblau at common-lisp.net
Sun Dec 31 15:42:40 UTC 2006


Update of /project/closure/cvsroot/closure/src/glisp
In directory clnet:/tmp/cvs-serv11810/src/glisp

Modified Files:
	dep-acl.lisp dep-clisp.lisp dep-cmucl.lisp dep-gcl.lisp 
	dep-openmcl.lisp dep-sbcl.lisp dep-scl.lisp package.lisp 
Log Message:

Use Bordeaux Threads for all threading primitives, so that non-GUI parts of
Closure don't have to depend on CLIM anymore.

  - Removed all mp/ functions from glisp.

  - Use condition variables instead of process-wait.


--- /project/closure/cvsroot/closure/src/glisp/dep-acl.lisp	2006/12/31 12:14:36	1.3
+++ /project/closure/cvsroot/closure/src/glisp/dep-acl.lisp	2006/12/31 15:42:40	1.4
@@ -29,14 +29,6 @@
 (export 'glisp::read-byte-sequence :glisp)
 (export 'glisp::read-char-sequence :glisp)
 (export 'glisp::run-unix-shell-command :glisp)
-(export 'glisp::mp/process-run-function :glisp)
-(export 'glisp::mp/process-kill :glisp)
-(export 'glisp::mp/seize-lock :glisp)
-(export 'glisp::mp/release-lock :glisp)
-(export 'glisp::mp/transfer-lock-owner :glisp)
-(export 'glisp::mp/current-process :glisp)
-(export 'glisp::mp/process-yield :glisp)
-(export 'glisp::mp/process-wait :glisp)
 (export 'glisp::getenv :glisp)
 
 (defun glisp::read-byte-sequence (&rest ap)
@@ -67,13 +59,6 @@
 )
 ||#
 
-(defun glisp::mp/make-lock (&key name)
-  (mp:make-process-lock :name name))
-
-(defmacro glisp::mp/with-lock ((lock) &body body)
-  `(mp:with-process-lock (,lock)
-     , at body))
-
 (defmacro glisp::with-timeout ((&rest options) &body body)
   `(mp:with-timeout ,options . ,body))
 
@@ -83,32 +68,5 @@
 (defun glisp:run-unix-shell-command (cmd)
   (excl:shell cmd))
 
-(defun glisp:mp/process-run-function (name fn &rest args)
-  (apply #'mp:process-run-function name fn args))
-
-(defun glisp:mp/process-kill (proc)
-  (mp:process-kill proc))
-
-(defun glisp:mp/current-process ()
-  sys:*current-process*)
-
-(defun glisp::mp/seize-lock (lock &key whostate)
-  whostate
-  (mp:process-lock lock))
-
-(defun glisp::mp/transfer-lock-owner (lock old-process new-process)
-  (assert (eql (mp:process-lock-locker lock) old-process))
-  (setf (mp:process-lock-locker lock) new-process)
-  )
-
-(defun glisp::mp/release-lock (lock)
-  (mp:process-unlock lock))
-
-(defun glisp::mp/process-yield (&optional process-to-run)
-  (mp:process-allow-schedule process-to-run))
-
-(defun glisp::mp/process-wait (whostate predicate)
-  (mp:process-wait whostate predicate))
-
 (defun glisp::getenv (string)
   (sys:getenv string))
--- /project/closure/cvsroot/closure/src/glisp/dep-clisp.lisp	2006/12/31 12:14:36	1.3
+++ /project/closure/cvsroot/closure/src/glisp/dep-clisp.lisp	2006/12/31 15:42:40	1.4
@@ -123,54 +123,3 @@
 (export 'glisp::getenv :glisp)
 (defun glisp::getenv (var)
   (sys::getenv var))
-
-
-
-(export 'glisp::mp/process-run-function :glisp)
-(defun glisp:mp/process-run-function (name fn &rest args)
-  (apply #'mp:process-run-function name fn args))
-
-(export 'glisp::mp/process-kill :glisp)
-(defun glisp:mp/process-kill (proc)
-  (mp:process-kill proc))
-
-(export 'glisp::mp/current-process :glisp)
-(defun glisp:mp/current-process ()
-  (mp:current-process))
-
-(export 'glisp::mp/seize-lock :glisp)
-(defun glisp::mp/seize-lock (lock &key whostate)
-  whostate
-  (mp:process-lock lock))
-
-(export 'glisp::mp/release-lock :glisp)
-(defun glisp::mp/release-lock (lock)
-  (mp:process-unlock lock))
-
-(export 'glisp::mp/process-yield :glisp)
-(defun glisp::mp/process-yield (&optional process-to-run)
-  process-to-run
-  (mp:process-allow-schedule))
-
-(export 'glisp::mp/process-wait :glisp)
-(defun glisp::mp/process-wait (whostate predicate)
-  (mp::process-wait whostate predicate))
-
-(defmacro glisp::mp/with-lock ((lock) &body body)
-  `(mp:with-process-lock (,lock)
-     , at body))
-
-(defun glisp::mp/make-lock (&key name)
-  (mp:make-process-lock :name name))
-
-
-
-
-
-
-
-
-
-
-
-
--- /project/closure/cvsroot/closure/src/glisp/dep-cmucl.lisp	2006/12/31 12:14:36	1.3
+++ /project/closure/cvsroot/closure/src/glisp/dep-cmucl.lisp	2006/12/31 15:42:40	1.4
@@ -192,7 +192,7 @@
 On Wednesday, 7/1/98 12:48:51 pm [-1] it was compiled from:
 target:code/run-program.lisp
   Created: Saturday, 6/20/98 07:13:08 pm [-1]
-  Comment: $Header: /project/closure/cvsroot/closure/src/glisp/dep-cmucl.lisp,v 1.3 2006/12/31 12:14:36 dlichteblau Exp $
+  Comment: $Header: /project/closure/cvsroot/closure/src/glisp/dep-cmucl.lisp,v 1.4 2006/12/31 15:42:40 dlichteblau Exp $
 ||#
 
 ;; (process-exit-code (run-program "/bin/sh" (list "-c" "ls") :wait t :input nil :output nil))
@@ -200,41 +200,5 @@
 (defun glisp:run-unix-shell-command (command)
   (ext:process-exit-code (ext:run-program "/bin/sh" (list "-c" command) :wait t :input nil :output nil)))
 
-;;; MP
-
-(export 'glisp::mp/process-yield :glisp)
-(export 'glisp::mp/process-wait :glisp)
-(export 'glisp::mp/process-run-function :glisp)
-(export 'glisp::mp/make-lock :glisp)
-(export 'glisp::mp/current-process :glisp)
-(export 'glisp::mp/process-kill :glisp)
-
-(defun glisp::mp/make-lock (&key name)
-  (mp:make-lock name))
-
-(defmacro glisp::mp/with-lock ((lock) &body body)
-  `(mp:with-lock-held (,lock)
-     , at body))
-
-(defun glisp::mp/process-yield (&optional process-to-run)
-  (declare (ignore process-to-run))
-  (mp:process-yield))
-
-(defun glisp::mp/process-wait (whostate predicate)
-  (mp:process-wait whostate predicate))
-
-(defun glisp::mp/process-run-function (name fun &rest args)
-  (mp:make-process
-   (lambda ()
-     (apply fun args))
-   :name name))
-
-(defun glisp::mp/current-process ()
-  mp:*current-process*)
-
-(defun glisp::mp/process-kill (process)
-  (mp:destroy-process process))
-
 (defun glisp::getenv (string)
   (cdr (assoc string ext:*environment-list* :test #'string-equal)))
-
--- /project/closure/cvsroot/closure/src/glisp/dep-gcl.lisp	2005/03/13 18:01:15	1.2
+++ /project/closure/cvsroot/closure/src/glisp/dep-gcl.lisp	2006/12/31 15:42:40	1.3
@@ -100,15 +100,6 @@
               index)
     value))
 
-(defun glisp::mp/make-lock (&key name)
-  name
-  nil)
-
-(defmacro glisp::mp/with-lock ((lock) &body body)
-  (declare (ignore lock))
-  `(progn
-     , at body))
-
 (defmacro glisp::with-timeout ((&rest ignore) &body body)
   (declare (ignore ignore))
   `(progn
--- /project/closure/cvsroot/closure/src/glisp/dep-openmcl.lisp	2006/12/31 12:14:36	1.2
+++ /project/closure/cvsroot/closure/src/glisp/dep-openmcl.lisp	2006/12/31 15:42:40	1.3
@@ -145,41 +145,6 @@
    (ccl:run-program "/bin/sh" (list "-c" command) :wait t :input nil
 		       :output nil))))
 
-;;; MP
-
-(export 'glisp::mp/process-yield :glisp)
-(export 'glisp::mp/process-wait :glisp)
-(export 'glisp::mp/process-run-function :glisp)
-(export 'glisp::mp/make-lock :glisp)
-(export 'glisp::mp/current-process :glisp)
-(export 'glisp::mp/process-kill :glisp)
-
-(defun glisp::mp/make-lock (&key name)
-  (clim-sys::make-lock name))
-
-(defmacro glisp::mp/with-lock ((lock) &body body)
-  `(clim-sys:with-lock-held (,lock)
-    , at body))
-
-(defun glisp::mp/process-yield (&optional process-to-run)
-  (declare (ignore process-to-run))
-  (clim-sys:process-yield))
-
-(defun glisp::mp/process-wait (whostate predicate)
-  (clim-sys:process-wait whostate predicate))
-
-(defun glisp::mp/process-run-function (name fun &rest args)
-  (clim-sys:make-process
-   (lambda ()
-     (apply fun args))
-   :name name))
-
-(defun glisp::mp/current-process ()
-  (clim-sys:current-process))
-
-(defun glisp::mp/process-kill (process)
-  (clim-sys:destroy-process process))
-
 (defun glisp::getenv (string)
   (ccl::getenv string))
 
\ No newline at end of file
--- /project/closure/cvsroot/closure/src/glisp/dep-sbcl.lisp	2006/12/31 12:14:36	1.4
+++ /project/closure/cvsroot/closure/src/glisp/dep-sbcl.lisp	2006/12/31 15:42:40	1.5
@@ -100,41 +100,5 @@
    (sb-ext:run-program "/bin/sh" (list "-c" command) :wait t :input nil
 		       :output nil)))
 
-;;; MP
-
-(export 'glisp::mp/process-yield :glisp)
-(export 'glisp::mp/process-wait :glisp)
-(export 'glisp::mp/process-run-function :glisp)
-(export 'glisp::mp/make-lock :glisp)
-(export 'glisp::mp/current-process :glisp)
-(export 'glisp::mp/process-kill :glisp)
-
-(defun glisp::mp/make-lock (&key name)
-  (clim-sys::make-lock name))
-
-(defmacro glisp::mp/with-lock ((lock) &body body)
-  `(clim-sys:with-lock-held (,lock)
-    , at body))
-
-(defun glisp::mp/process-yield (&optional process-to-run)
-  (declare (ignore process-to-run))
-  (clim-sys:process-yield))
-
-(defun glisp::mp/process-wait (whostate predicate)
-  (clim-sys:process-wait whostate predicate))
-
-(defun glisp::mp/process-run-function (name fun &rest args)
-  (clim-sys:make-process
-   (lambda ()
-     (apply fun args))
-   :name name))
-
-(defun glisp::mp/current-process ()
-  (clim-sys:current-process))
-
-(defun glisp::mp/process-kill (process)
-  (clim-sys:destroy-process process))
-
 (defun glisp::getenv (string)
   (sb-ext:posix-getenv string))
-
--- /project/closure/cvsroot/closure/src/glisp/dep-scl.lisp	2006/12/31 13:11:44	1.1
+++ /project/closure/cvsroot/closure/src/glisp/dep-scl.lisp	2006/12/31 15:42:40	1.2
@@ -161,7 +161,7 @@
 On Wednesday, 7/1/98 12:48:51 pm [-1] it was compiled from:
 target:code/run-program.lisp
   Created: Saturday, 6/20/98 07:13:08 pm [-1]
-  Comment: $Header: /project/closure/cvsroot/closure/src/glisp/dep-scl.lisp,v 1.1 2006/12/31 13:11:44 dlichteblau Exp $
+  Comment: $Header: /project/closure/cvsroot/closure/src/glisp/dep-scl.lisp,v 1.2 2006/12/31 15:42:40 dlichteblau Exp $
 ||#
 
 ;; (process-exit-code (run-program "/bin/sh" (list "-c" "ls") :wait t :input nil :output nil))
@@ -172,41 +172,5 @@
 
 ;;; MP
 
-(export 'glisp::mp/process-yield :glisp)
-(export 'glisp::mp/process-wait :glisp)
-(export 'glisp::mp/process-run-function :glisp)
-(export 'glisp::mp/make-lock :glisp)
-(export 'glisp::mp/current-process :glisp)
-(export 'glisp::mp/process-kill :glisp)
-
-(defun glisp::mp/make-lock (&key name)
-  (pthread::make-lock name))
-
-(defmacro glisp::mp/with-lock ((lock) &body body)
-  `(pthread::with-lock-held (,lock)
-     , at body))
-
-(defun glisp::mp/process-yield (&optional process-to-run)
-  (declare (ignore process-to-run))
-  (PTHREAD:SCHED-YIELD))
-
-(defun glisp::mp/process-wait (whostate predicate)
-  (do ()
-      ((funcall predicate))
-    (sleep .1)))
-
-(defun glisp::mp/process-run-function (name fun &rest args)
-  (pthread::thread-create
-   (lambda ()
-     (apply fun args))
-   :name name))
-
-(defun glisp::mp/current-process ()
-  'blah)
-
-(defun glisp::mp/process-kill (process)
-  (warn "*** Define GLISP:MP/PROCESS-KILL for CMUCL."))
-
 (defun glisp::getenv (string)
   (cdr (assoc string ext:*environment-list* :test #'string-equal)))
-
--- /project/closure/cvsroot/closure/src/glisp/package.lisp	2006/12/31 12:35:18	1.7
+++ /project/closure/cvsroot/closure/src/glisp/package.lisp	2006/12/31 15:42:40	1.8
@@ -32,8 +32,6 @@
   (:use :cl)
   (:export "DEFSUBST"
 	   "G/MAKE-STRING"
-	   "MP/MAKE-LOCK"
-	   "MP/WITH-LOCK"
 	   "WITH-TIMEOUT"
 	   "OPEN-INET-SOCKET"
 	   ;; util.lisp :




More information about the Closure-cvs mailing list